Fix some KeyErrors when playing songs

This commit is contained in:
croneter 2019-03-09 16:19:29 +01:00
parent 9ba49a663e
commit c69176d4a1

View file

@ -454,6 +454,9 @@ def _record_playstate(status, ended):
if not status['plex_id']:
LOG.debug('No Plex id found to record playstate for status %s', status)
return
if status['plex_type'] not in v.PLEX_VIDEOTYPES:
LOG.debug('Not messing with non-video entries')
return
with PlexDB() as plexdb:
db_item = plexdb.item_by_id(status['plex_id'], status['plex_type'])
if not db_item: