Fix playback receiving string plex id, not int
This commit is contained in:
parent
1b94e23386
commit
b7fa4f2c7b
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue