From c69176d4a1e70964c47113353aba4c2dd64bb910 Mon Sep 17 00:00:00 2001 From: croneter Date: Sat, 9 Mar 2019 16:19:29 +0100 Subject: [PATCH] Fix some KeyErrors when playing songs --- resources/lib/kodimonitor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index d27fb696..ae2e8ef3 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -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: