diff --git a/resources/lib/playback.py b/resources/lib/playback.py index 1980865a..a12c0df0 100644 --- a/resources/lib/playback.py +++ b/resources/lib/playback.py @@ -46,6 +46,7 @@ def playback_triage(plex_id=None, plex_type=None, path=None, resolve=True): the first pass - e.g. if you're calling this function from the original service.py Python instance """ + plex_id = utils.cast(int, plex_id) LOG.info('playback_triage called with plex_id %s, plex_type %s, path %s, ' 'resolve %s', plex_id, plex_type, path, resolve) global RESOLVE diff --git a/resources/lib/plex_functions.py b/resources/lib/plex_functions.py index c622ac9e..69acee81 100644 --- a/resources/lib/plex_functions.py +++ b/resources/lib/plex_functions.py @@ -722,7 +722,7 @@ def get_plex_sections(): return DU().downloadUrl('{server}/library/sections') -def init_plex_playqueue(itemid, librarySectionUUID, mediatype='movie', +def init_plex_playqueue(plex_id, librarySectionUUID, mediatype='movie', trailers=False): """ Returns raw API metadata XML dump for a playlist with e.g. trailers. @@ -730,8 +730,8 @@ def init_plex_playqueue(itemid, librarySectionUUID, mediatype='movie', url = "{server}/playQueues" args = { 'type': mediatype, - 'uri': ('library://' + librarySectionUUID + - '/item/%2Flibrary%2Fmetadata%2F' + itemid), + 'uri': ('library://{0}/item/%2Flibrary%2Fmetadata%2F{1}'.format( + librarySectionUUID, plex_id)), 'includeChapters': '1', 'shuffle': '0', 'repeat': '0'