Merge pull request #1678 from croneter/py3-fix-playback-startup

Fix Kodi JSON racing condition on playback startup and KeyError
This commit is contained in:
croneter 2021-10-22 21:22:38 +02:00 committed by GitHub
commit cf149558be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,6 +390,10 @@ class KodiMonitor(xbmc.Monitor):
if not self._switched_to_plex_streams:
# We need to switch to the Plex streams ONCE upon playback start
# 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.switch_to_plex_stream('video')
if utils.settings('audioStreamPick') == '0':