Fix KeyError for Plex Companion

This commit is contained in:
tomkat83 2017-05-11 20:07:23 +02:00
parent 5c8c399b30
commit af55d75bf3

View file

@ -227,7 +227,8 @@ class SubscriptionManager:
props = self.js.jsonrpc( props = self.js.jsonrpc(
"Player.GetProperties", "Player.GetProperties",
{"playerid": playerid, {"playerid": playerid,
"properties": ["time", "properties": ["type",
"time",
"totaltime", "totaltime",
"speed", "speed",
"shuffled", "shuffled",
@ -252,7 +253,7 @@ class SubscriptionManager:
info['playQueueVersion'] = playqueue.version or 'null' info['playQueueVersion'] = playqueue.version or 'null'
info['itemType'] = playqueue.items[pos].plex_type or 'null' info['itemType'] = playqueue.items[pos].plex_type or 'null'
except: except:
pass info['itemType'] = props.get('type') or 'null'
except: except:
import traceback import traceback
log.error("Traceback:\n%s" % traceback.format_exc()) log.error("Traceback:\n%s" % traceback.format_exc())