Always re-fetch playQueues from PMS

This commit is contained in:
tomkat83 2017-01-09 20:00:37 +01:00
parent 4b1c2e9447
commit a45af3d253

View file

@ -84,8 +84,6 @@ 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:
log.debug('Need to fetch new playQueue from the PMS')
xml = PL.get_PMS_playlist(playqueue, playqueue_id) xml = PL.get_PMS_playlist(playqueue, playqueue_id)
if xml is None: if xml is None:
log.error('Could not get playqueue ID %s' % playqueue_id) log.error('Could not get playqueue ID %s' % playqueue_id)
@ -93,9 +91,6 @@ class Playqueue(Thread):
playqueue.clear() playqueue.clear()
PL.get_playlist_details_from_xml(playqueue, xml) PL.get_playlist_details_from_xml(playqueue, xml)
PlaybackUtils(xml, playqueue).play_all() 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,