Fix Kodi JSON racing condition on playback startup and KeyError
This commit is contained in:
parent
2850889c98
commit
20f5d9d561
1 changed files with 4 additions and 0 deletions
|
@ -390,6 +390,10 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
if not self._switched_to_plex_streams:
|
if not self._switched_to_plex_streams:
|
||||||
# We need to switch to the Plex streams ONCE upon playback start
|
# We need to switch to the Plex streams ONCE upon playback start
|
||||||
# after onavchange has been fired
|
# after onavchange has been fired
|
||||||
|
# Wait a bit because JSON responses won't be ready otherwise
|
||||||
|
if app.APP.monitor.waitForAbort(2):
|
||||||
|
# In case PKC needs to quit
|
||||||
|
return
|
||||||
item.init_kodi_streams()
|
item.init_kodi_streams()
|
||||||
item.switch_to_plex_stream('video')
|
item.switch_to_plex_stream('video')
|
||||||
if utils.settings('audioStreamPick') == '0':
|
if utils.settings('audioStreamPick') == '0':
|
||||||
|
|
Loading…
Reference in a new issue