Fix KeyError for Plex Companion
This commit is contained in:
parent
5c8c399b30
commit
af55d75bf3
1 changed files with 3 additions and 2 deletions
|
@ -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())
|
||||||
|
|
Loading…
Reference in a new issue