Prevent crash for missing seriesId
Apparently, that's a thing now, an episode without a seriesId.
This commit is contained in:
parent
4af994ed74
commit
7b94b76ef4
1 changed files with 7 additions and 1 deletions
|
@ -1287,7 +1287,13 @@ class TVShows(Items):
|
||||||
premieredate = API.getPremiereDate()
|
premieredate = API.getPremiereDate()
|
||||||
|
|
||||||
# episode details
|
# 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']
|
seriesName = item['SeriesName']
|
||||||
season = item.get('ParentIndexNumber')
|
season = item.get('ParentIndexNumber')
|
||||||
episode = item.get('IndexNumber', -1)
|
episode = item.get('IndexNumber', -1)
|
||||||
|
|
Loading…
Reference in a new issue