Fix playback starting in the background

This commit is contained in:
croneter 2018-01-23 20:38:50 +01:00
parent e8d9252891
commit 307806e65f

View file

@ -60,6 +60,8 @@ def playback_triage(plex_id=None, plex_type=None, path=None):
try: try:
playqueue.items[pos] playqueue.items[pos]
except IndexError: except IndexError:
# Release our default.py before starting our own Kodi player instance
pickle_me(Playback_Successful())
playback_init(plex_id, plex_type, playqueue) playback_init(plex_id, plex_type, playqueue)
else: else:
# kick off playback on second pass # kick off playback on second pass
@ -156,10 +158,8 @@ def playback_init(plex_id, plex_type, playqueue):
# LOG.info('Resume detected') # LOG.info('Resume detected')
# play_resume(playqueue, xml, stack) # play_resume(playqueue, xml, stack)
# return # return
# Release our default.py before starting our own Kodi player instance
pickle_me(Playback_Successful())
# Sleep a bit to let setResolvedUrl do its thing - bit ugly # Sleep a bit to let setResolvedUrl do its thing - bit ugly
sleep(100) sleep(300)
_process_stack(playqueue, stack) _process_stack(playqueue, stack)
# New thread to release this one sooner (e.g. harddisk spinning up) # New thread to release this one sooner (e.g. harddisk spinning up)
thread = Thread(target=Player().play, thread = Thread(target=Player().play,