Merge pull request #760 from croneter/fix-keyerror

Fix some KeyErrors when playing songs
This commit is contained in:
croneter 2019-03-10 18:00:53 +01:00 committed by GitHub
commit 86cde7c69a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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: