Fix SeriesName missing

Prevent crash from happening.
This commit is contained in:
angelblue05 2016-06-16 00:49:54 -05:00
parent 7a0f69e014
commit b9d40d91a6
2 changed files with 3 additions and 3 deletions

View file

@ -192,7 +192,7 @@ class Items(object):
title = item['Name']
if itemtype == "Episode":
title = "%s - %s" % (item['SeriesName'], title)
title = "%s - %s" % (item.get('SeriesName', "Unknown"), title)
if pdialog:
percentage = int((float(count) / float(total))*100)
@ -1284,7 +1284,6 @@ class TVShows(Items):
self.logMsg("Skipping: %s. SeriesId is missing." % itemid, 1)
return False
seriesName = item['SeriesName']
season = item.get('ParentIndexNumber')
episode = item.get('IndexNumber', -1)

View file

@ -1363,7 +1363,8 @@ class ManualSync(LibrarySync):
if pdialog:
percentage = int((float(count) / float(total))*100)
pdialog.update(percentage, message="%s - %s" % (episode['SeriesName'], episode['Name']))
title = "%s - %s" % (episode.get('SeriesName', "Unknown"), episode['Name'])
pdialog.update(percentage, message=title)
count += 1
tvshows.add_updateEpisode(episode)