From 7b94b76ef46a4a818a2300b3de07e75668144d04 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Sat, 12 Mar 2016 15:42:14 -0600 Subject: [PATCH] Prevent crash for missing seriesId Apparently, that's a thing now, an episode without a seriesId. --- resources/lib/itemtypes.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 54b8c64d..2c01889e 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -1287,7 +1287,13 @@ class TVShows(Items): premieredate = API.getPremiereDate() # episode details - seriesId = item['SeriesId'] + try: + seriesId = item['SeriesId'] + except KeyError: + # Missing seriesId, skip + self.logMsg("Skipping: %s. SeriesId is missing." % itemid, 1) + return False + seriesName = item['SeriesName'] season = item.get('ParentIndexNumber') episode = item.get('IndexNumber', -1)