Prevent crash for missing seriesId

Apparently, that's a thing now, an episode without a seriesId.
This commit is contained in:
angelblue05 2016-03-12 15:42:14 -06:00
parent 4af994ed74
commit 7b94b76ef4

View file

@ -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)