diff --git a/resources/lib/itemtypes.py b/resources/lib/itemtypes.py index 18c90517..8151ee93 100644 --- a/resources/lib/itemtypes.py +++ b/resources/lib/itemtypes.py @@ -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) diff --git a/resources/lib/librarysync.py b/resources/lib/librarysync.py index d3a441dd..1335f585 100644 --- a/resources/lib/librarysync.py +++ b/resources/lib/librarysync.py @@ -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)