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: # Get the playlist position
info['playQueueID'] = playqueue.ID pos = self.js.jsonrpc(
info['playQueueVersion'] = playqueue.version "Player.GetProperties",
# Get the playlist position {"playerid": playerid,
pos = self.js.jsonrpc( "properties": ["position"]})['position']
"Player.GetProperties", try:
{"playerid": playerid,
"properties": ["position"]})['position']
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())