Krypton: Fix playState notifications for 1 video

This commit is contained in:
tomkat83 2017-01-12 20:06:53 +01:00
parent 359603ac0f
commit 1fc7277294

View file

@ -250,16 +250,18 @@ class SubscriptionManager:
'shuffle': ("0", "1")[props.get('shuffled', False)], 'shuffle': ("0", "1")[props.get('shuffled', False)],
'repeat': pf.getPlexRepeat(props.get('repeat')), 'repeat': pf.getPlexRepeat(props.get('repeat')),
} }
if playqueue.ID is not None:
info['playQueueID'] = playqueue.ID
info['playQueueVersion'] = playqueue.version
# Get the playlist position # Get the playlist position
pos = self.js.jsonrpc( pos = self.js.jsonrpc(
"Player.GetProperties", "Player.GetProperties",
{"playerid": playerid, {"playerid": playerid,
"properties": ["position"]})['position'] "properties": ["position"]})['position']
try:
info['playQueueItemID'] = playqueue.items[pos].ID info['playQueueItemID'] = playqueue.items[pos].ID
info['guid'] = playqueue.items[pos].guid info['guid'] = playqueue.items[pos].guid
info['playQueueID'] = playqueue.ID
info['playQueueVersion'] = playqueue.version
except:
pass
except: except:
import traceback import traceback
log.error("Traceback:\n%s" % traceback.format_exc()) log.error("Traceback:\n%s" % traceback.format_exc())