Merge pull request #640 from croneter/fix_kodi_fileid
Fix KeyError: u'kodi_fileid' for some Plex websocket messages
This commit is contained in:
commit
b5d0e4f428
1 changed files with 5 additions and 1 deletions
|
@ -279,8 +279,12 @@ def process_playing(data):
|
||||||
LOG.debug('Updated current sessions. They are: %s',
|
LOG.debug('Updated current sessions. They are: %s',
|
||||||
PLAYSTATE_SESSIONS)
|
PLAYSTATE_SESSIONS)
|
||||||
# Attach Kodi info to the session
|
# Attach Kodi info to the session
|
||||||
PLAYSTATE_SESSIONS[session_key]['kodi_id'] = typus['kodi_id']
|
try:
|
||||||
PLAYSTATE_SESSIONS[session_key]['file_id'] = typus['kodi_fileid']
|
PLAYSTATE_SESSIONS[session_key]['file_id'] = typus['kodi_fileid']
|
||||||
|
except KeyError:
|
||||||
|
# media type without file - no need to do anything
|
||||||
|
continue
|
||||||
|
PLAYSTATE_SESSIONS[session_key]['kodi_id'] = typus['kodi_id']
|
||||||
PLAYSTATE_SESSIONS[session_key]['kodi_type'] = typus['kodi_type']
|
PLAYSTATE_SESSIONS[session_key]['kodi_type'] = typus['kodi_type']
|
||||||
session = PLAYSTATE_SESSIONS[session_key]
|
session = PLAYSTATE_SESSIONS[session_key]
|
||||||
if utils.settings('plex_serverowned') != 'false':
|
if utils.settings('plex_serverowned') != 'false':
|
||||||
|
|
Loading…
Reference in a new issue