From e81bee01019592b0b8668dc0fbd0c9e112ab6f4c Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 31 Mar 2018 18:51:03 +0200 Subject: [PATCH] Fix resetting PKC player state - Should fix #445 --- resources/lib/kodimonitor.py | 2 +- resources/lib/player.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index 631057dd..04f24877 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -380,7 +380,7 @@ class KodiMonitor(Monitor): plex_id, plex_type = self._get_ids(kodi_id, kodi_type, path) if not plex_id: LOG.debug('No Plex id obtained - aborting playback report') - status = copy.deepcopy(state.PLAYSTATE) + state.PLAYER_STATES[playerid] = copy.deepcopy(state.PLAYSTATE) return item = PL.init_Plex_playlist(playqueue, plex_id=plex_id) # Set the Plex container key (e.g. using the Plex playqueue) diff --git a/resources/lib/player.py b/resources/lib/player.py index 04df82bd..982c31ce 100644 --- a/resources/lib/player.py +++ b/resources/lib/player.py @@ -48,7 +48,7 @@ def playback_cleanup(ended=False): # started playback via PMS _record_playstate(status, ended) # Reset the player's status - status = copy.deepcopy(state.PLAYSTATE) + state.PLAYER_STATES[playerid] = copy.deepcopy(state.PLAYSTATE) # As all playback has halted, reset the players that have been active state.ACTIVE_PLAYERS = [] LOG.debug('Finished PKC playback cleanup')