Fix rare KeyError for playback including trailers

This commit is contained in:
Croneter 2018-03-28 08:04:03 +02:00
parent 6aa3e612cf
commit 9f82b05c11

View file

@ -212,6 +212,8 @@ class KodiMonitor(Monitor):
} }
Will NOT be called if playback initiated by Kodi widgets Will NOT be called if playback initiated by Kodi widgets
""" """
if 'id' not in data['item']:
return
old = state.OLD_PLAYER_STATES[data['playlistid']] old = state.OLD_PLAYER_STATES[data['playlistid']]
if (not state.DIRECT_PATHS and data['position'] == 0 and if (not state.DIRECT_PATHS and data['position'] == 0 and
not PQ.PLAYQUEUES[data['playlistid']].items and not PQ.PLAYQUEUES[data['playlistid']].items and