Fix resetting PKC player state

- Should fix #445
This commit is contained in:
croneter 2018-03-31 18:51:03 +02:00
parent 9a4533d7e0
commit e81bee0101
2 changed files with 2 additions and 2 deletions

View file

@ -380,7 +380,7 @@ class KodiMonitor(Monitor):
plex_id, plex_type = self._get_ids(kodi_id, kodi_type, path) plex_id, plex_type = self._get_ids(kodi_id, kodi_type, path)
if not plex_id: if not plex_id:
LOG.debug('No Plex id obtained - aborting playback report') LOG.debug('No Plex id obtained - aborting playback report')
status = copy.deepcopy(state.PLAYSTATE) state.PLAYER_STATES[playerid] = copy.deepcopy(state.PLAYSTATE)
return return
item = PL.init_Plex_playlist(playqueue, plex_id=plex_id) item = PL.init_Plex_playlist(playqueue, plex_id=plex_id)
# Set the Plex container key (e.g. using the Plex playqueue) # Set the Plex container key (e.g. using the Plex playqueue)

View file

@ -48,7 +48,7 @@ def playback_cleanup(ended=False):
# started playback via PMS # started playback via PMS
_record_playstate(status, ended) _record_playstate(status, ended)
# Reset the player's status # 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 # As all playback has halted, reset the players that have been active
state.ACTIVE_PLAYERS = [] state.ACTIVE_PLAYERS = []
LOG.debug('Finished PKC playback cleanup') LOG.debug('Finished PKC playback cleanup')