Always re-fetch playQueues from PMS
This commit is contained in:
parent
4b1c2e9447
commit
a45af3d253
1 changed files with 7 additions and 14 deletions
|
@ -84,18 +84,13 @@ class Playqueue(Thread):
|
||||||
log.info('New playqueue %s received from Plex companion with offset '
|
log.info('New playqueue %s received from Plex companion with offset '
|
||||||
'%s, repeat %s' % (playqueue_id, offset, repeat))
|
'%s, repeat %s' % (playqueue_id, offset, repeat))
|
||||||
with lock:
|
with lock:
|
||||||
if playqueue_id != playqueue.ID:
|
xml = PL.get_PMS_playlist(playqueue, playqueue_id)
|
||||||
log.debug('Need to fetch new playQueue from the PMS')
|
if xml is None:
|
||||||
xml = PL.get_PMS_playlist(playqueue, playqueue_id)
|
log.error('Could not get playqueue ID %s' % playqueue_id)
|
||||||
if xml is None:
|
return
|
||||||
log.error('Could not get playqueue ID %s' % playqueue_id)
|
playqueue.clear()
|
||||||
return
|
PL.get_playlist_details_from_xml(playqueue, xml)
|
||||||
playqueue.clear()
|
PlaybackUtils(xml, playqueue).play_all()
|
||||||
PL.get_playlist_details_from_xml(playqueue, xml)
|
|
||||||
PlaybackUtils(xml, playqueue).play_all()
|
|
||||||
else:
|
|
||||||
log.debug('Restarting existing playQueue')
|
|
||||||
PL.refresh_playlist_from_PMS(playqueue)
|
|
||||||
playqueue.repeat = 0 if not repeat else int(repeat)
|
playqueue.repeat = 0 if not repeat else int(repeat)
|
||||||
window('plex_customplaylist', value="true")
|
window('plex_customplaylist', value="true")
|
||||||
if offset not in (None, "0"):
|
if offset not in (None, "0"):
|
||||||
|
@ -109,8 +104,6 @@ class Playqueue(Thread):
|
||||||
# Start playback. Player does not return in time
|
# Start playback. Player does not return in time
|
||||||
log.debug('Playqueues after Plex Companion update are now: %s'
|
log.debug('Playqueues after Plex Companion update are now: %s'
|
||||||
% self.playqueues)
|
% self.playqueues)
|
||||||
log.debug('Start position Plex Companion playback: %s'
|
|
||||||
% startpos)
|
|
||||||
thread = Thread(target=Player().play,
|
thread = Thread(target=Player().play,
|
||||||
args=(playqueue.kodi_pl,
|
args=(playqueue.kodi_pl,
|
||||||
None,
|
None,
|
||||||
|
|
Loading…
Reference in a new issue