diff --git a/resources/lib/PlexCompanion.py b/resources/lib/PlexCompanion.py index 0f9162fb..89d5a7a9 100644 --- a/resources/lib/PlexCompanion.py +++ b/resources/lib/PlexCompanion.py @@ -195,7 +195,10 @@ class PlexCompanion(Thread): elif task['action'] == 'refreshPlayQueue': self._process_refresh(data) elif task['action'] == 'setStreams': - self._process_streams(data) + try: + self._process_streams(data) + except KeyError: + pass def run(self): """ diff --git a/resources/lib/playback.py b/resources/lib/playback.py index 57f2377f..ea54923e 100644 --- a/resources/lib/playback.py +++ b/resources/lib/playback.py @@ -62,7 +62,11 @@ def playback_triage(plex_id=None, plex_type=None, path=None, resolve=True): return playqueue = PQ.get_playqueue_from_type( v.KODI_PLAYLIST_TYPE_FROM_PLEX_TYPE[plex_type]) - pos = js.get_position(playqueue.playlistid) + try: + pos = js.get_position(playqueue.playlistid) + except KeyError: + LOG.warning('No position returned from Kodi player! Assuming 0') + pos = 0 # Can return -1 (as in "no playlist") pos = pos if pos != -1 else 0 LOG.debug('playQueue position %s for %s', pos, playqueue)