From b1359809815482a2aeaa32cf49baa97a083f1672 Mon Sep 17 00:00:00 2001 From: Croneter Date: Thu, 14 Jun 2018 16:40:26 +0200 Subject: [PATCH] Fix Kodi telling Plex companion false playqueue position --- resources/lib/plexbmchelper/subscribers.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/lib/plexbmchelper/subscribers.py b/resources/lib/plexbmchelper/subscribers.py index aa8d2b19..7dc4c20b 100644 --- a/resources/lib/plexbmchelper/subscribers.py +++ b/resources/lib/plexbmchelper/subscribers.py @@ -307,8 +307,13 @@ class SubscriptionMgr(object): for player in players.values(): info = state.PLAYER_STATES[player['playerid']] playqueue = PQ.PLAYQUEUES[player['playerid']] + if playqueue.kodi_playlist_playback: + # Bug: Kodi will tell us the PLAYLIST instead of playqueue pos + position = 0 + else: + position = info['position'] try: - item = playqueue.items[info['position']] + item = playqueue.items[position] except IndexError: # E.g. for direct path playback for single item return False