From 1fc7277294b4c37e54c227a39cb5f1de19ea41d8 Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Thu, 12 Jan 2017 20:06:53 +0100 Subject: [PATCH] Krypton: Fix playState notifications for 1 video --- resources/lib/plexbmchelper/subscribers.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/resources/lib/plexbmchelper/subscribers.py b/resources/lib/plexbmchelper/subscribers.py index 54a8207e..1467e398 100644 --- a/resources/lib/plexbmchelper/subscribers.py +++ b/resources/lib/plexbmchelper/subscribers.py @@ -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())