Fix Kodi telling Plex companion false playqueue position

This commit is contained in:
Croneter 2018-06-14 16:40:26 +02:00
parent 7ccfb61a7c
commit b135980981

View file

@ -307,8 +307,13 @@ class SubscriptionMgr(object):
for player in players.values(): for player in players.values():
info = state.PLAYER_STATES[player['playerid']] info = state.PLAYER_STATES[player['playerid']]
playqueue = PQ.PLAYQUEUES[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: try:
item = playqueue.items[info['position']] item = playqueue.items[position]
except IndexError: except IndexError:
# E.g. for direct path playback for single item # E.g. for direct path playback for single item
return False return False