From 8c5baf80eee1e4ac5cb389e1078a73e58ce364f7 Mon Sep 17 00:00:00 2001 From: croneter Date: Mon, 2 Apr 2018 17:09:44 +0200 Subject: [PATCH] Only remember which player has been active if we got a Plex id --- resources/lib/kodimonitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index 04f24877..c6d0efda 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -339,8 +339,6 @@ class KodiMonitor(Monitor): except IndexError: LOG.error('Could not retreive active player - aborting') return - # Remember that this player has been active - state.ACTIVE_PLAYERS.append(playerid) playqueue = PQ.PLAYQUEUES[playerid] info = js.get_player_props(playerid) pos = info['position'] if info['position'] != -1 else 0 @@ -402,6 +400,8 @@ class KodiMonitor(Monitor): container_key = '/playQueues/%s' % playqueue.id else: container_key = '/library/metadata/%s' % plex_id + # Remember that this player has been active + state.ACTIVE_PLAYERS.append(playerid) status.update(info) LOG.debug('Set the Plex container_key to: %s', container_key) status['container_key'] = container_key