From ab0d5e24bef59fc1872f870ab16b04dbf2b4fbba Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sun, 18 Sep 2016 18:30:11 -0500 Subject: [PATCH] Fix keyerror --- resources/lib/librarysync.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index 7da77983..aa125c48 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -1283,7 +1283,7 @@ class ManualSync(LibrarySync): except ValueError: all_koditvshows = {} - log.info("all_koditvshows = %s" % all_koditvshows) + log.info("all_koditvshows = %s", all_koditvshows) try: all_kodiepisodes = dict(emby_db.get_checksum('Episode')) @@ -1364,7 +1364,8 @@ class ManualSync(LibrarySync): API = api.API(embyepisode) itemid = embyepisode['Id'] all_embyepisodesIds.add(itemid) - all_embytvshowsIds.add(embyepisode['SeriesId']) + if "SeriesId" in embyepisode: + all_embytvshowsIds.add(embyepisode['SeriesId']) if all_kodiepisodes.get(itemid) != API.get_checksum(): # Only update if movie is not in Kodi or checksum is different