Fix playback of last item not starting up

This commit is contained in:
croneter 2018-05-27 11:36:54 +02:00
parent ecc67b5707
commit 8a2622c3f8
2 changed files with 3 additions and 3 deletions

View File

@ -405,7 +405,7 @@ class KodiMonitor(xbmc.Monitor):
else:
container_key = '/library/metadata/%s' % plex_id
# Remember that this player has been active
state.ACTIVE_PLAYERS.append(playerid)
state.ACTIVE_PLAYERS.add(playerid)
status.update(info)
LOG.debug('Set the Plex container_key to: %s', container_key)
status['container_key'] = container_key
@ -473,7 +473,7 @@ def _playback_cleanup(ended=False):
# Reset the player's status
state.PLAYER_STATES[playerid] = copy.deepcopy(state.PLAYSTATE)
# As all playback has halted, reset the players that have been active
state.ACTIVE_PLAYERS = []
state.ACTIVE_PLAYERS = set()
LOG.debug('Finished PKC playback cleanup')

View File

@ -97,7 +97,7 @@ COMMAND_PIPELINE_QUEUE = None
WEBSOCKET_QUEUE = None
# Which Kodi player is/has been active? (either int 1, 2 or 3)
ACTIVE_PLAYERS = []
ACTIVE_PLAYERS = set()
# Failsafe for throwing an empty video back to Kodi's setResolvedUrl to set
# up our own playlist from the very beginning
PKC_CAUSED_STOP = False