Fix widget playback not starting up
This commit is contained in:
parent
8ad6d1bcce
commit
1123a2ee3c
2 changed files with 7 additions and 2 deletions
|
@ -41,7 +41,7 @@ class Main():
|
||||||
|
|
||||||
if mode == 'playstrm':
|
if mode == 'playstrm':
|
||||||
while not utils.window('plex.playlist.play'):
|
while not utils.window('plex.playlist.play'):
|
||||||
xbmc.sleep(50)
|
xbmc.sleep(25)
|
||||||
LOG.error('waiting')
|
LOG.error('waiting')
|
||||||
if utils.window('plex.playlist.aborted'):
|
if utils.window('plex.playlist.aborted'):
|
||||||
LOG.info("playback aborted")
|
LOG.info("playback aborted")
|
||||||
|
|
|
@ -334,11 +334,16 @@ class QueuePlay(backgroundthread.KillableThread):
|
||||||
# We will empty everything and start with a fresh VIDEO playlist
|
# We will empty everything and start with a fresh VIDEO playlist
|
||||||
LOG.debug('Widget video playback detected; relaunching')
|
LOG.debug('Widget video playback detected; relaunching')
|
||||||
video_widget_playback = True
|
video_widget_playback = True
|
||||||
|
# Release default.py
|
||||||
|
utils.window('plex.playlist.ready', value='true')
|
||||||
playqueue = PQ.get_playqueue_from_type(v.KODI_TYPE_AUDIO)
|
playqueue = PQ.get_playqueue_from_type(v.KODI_TYPE_AUDIO)
|
||||||
playqueue.clear()
|
playqueue.clear()
|
||||||
playqueue = PQ.get_playqueue_from_type(v.KODI_TYPE_VIDEO)
|
playqueue = PQ.get_playqueue_from_type(v.KODI_TYPE_VIDEO)
|
||||||
playqueue.clear()
|
playqueue.clear()
|
||||||
utils.window('plex.playlist.ready', value='true')
|
# Wait for Kodi to catch up - xbmcplugin.setResolvedUrl() needs to
|
||||||
|
# have run its course and thus the original item needs to have
|
||||||
|
# failed before we start playback anew
|
||||||
|
xbmc.sleep(200)
|
||||||
else:
|
else:
|
||||||
video_widget_playback = False
|
video_widget_playback = False
|
||||||
if self.plex_type in v.PLEX_VIDEOTYPES:
|
if self.plex_type in v.PLEX_VIDEOTYPES:
|
||||||
|
|
Loading…
Reference in a new issue