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)],
'repeat': pf.getPlexRepeat(props.get('repeat')),
}
if playqueue.ID is not None:
info['playQueueID'] = playqueue.ID
info['playQueueVersion'] = playqueue.version
# Get the playlist position
pos = self.js.jsonrpc(
"Player.GetProperties",
{"playerid": playerid,
"properties": ["position"]})['position']
# Get the playlist position
pos = self.js.jsonrpc(
"Player.GetProperties",
{"playerid": playerid,
"properties": ["position"]})['position']
try:
info['playQueueItemID'] = playqueue.items[pos].ID
info['guid'] = playqueue.items[pos].guid
info['playQueueID'] = playqueue.ID
info['playQueueVersion'] = playqueue.version
except:
pass
except:
import traceback
log.error("Traceback:\n%s" % traceback.format_exc())