Fix PKC playback startup getting caught in infinity loop
This commit is contained in:
parent
57d95e57f3
commit
f8ed5646c5
2 changed files with 5 additions and 1 deletions
|
@ -144,12 +144,12 @@ class KodiMonitor(xbmc.Monitor):
|
|||
if data.get('end'):
|
||||
if state.PKC_CAUSED_STOP is True:
|
||||
state.PKC_CAUSED_STOP = False
|
||||
state.PKC_CAUSED_STOP_DONE = True
|
||||
LOG.debug('PKC caused this playback stop - ignoring')
|
||||
else:
|
||||
_playback_cleanup(ended=True)
|
||||
else:
|
||||
_playback_cleanup()
|
||||
state.PKC_CAUSED_STOP_DONE = True
|
||||
state.SUSPEND_SYNC = False
|
||||
elif method == 'Playlist.OnAdd':
|
||||
self._playlist_onadd(data)
|
||||
|
|
|
@ -124,8 +124,12 @@ def _playback_init(plex_id, plex_type, playqueue, pos):
|
|||
LOG.debug('Playing trailers: %s', trailers)
|
||||
if RESOLVE:
|
||||
# Sleep a bit to let setResolvedUrl do its thing - bit ugly
|
||||
sleep_timer = 0
|
||||
while not state.PKC_CAUSED_STOP_DONE:
|
||||
sleep(50)
|
||||
sleep_timer += 1
|
||||
if sleep_timer > 100:
|
||||
break
|
||||
playqueue.clear()
|
||||
if plex_type != v.PLEX_TYPE_CLIP:
|
||||
# Post to the PMS to create a playqueue - in any case due to Companion
|
||||
|
|
Loading…
Reference in a new issue