Fix series pooling

This commit is contained in:
angelblue05 2018-09-14 21:28:10 -05:00
parent bb933604b0
commit a9bd8214b0

View file

@ -130,7 +130,6 @@ class TVShows(KodiDb):
season_episodes = [] season_episodes = []
for season in self.server['api'].get_seasons(obj['Id'])['Items']: for season in self.server['api'].get_seasons(obj['Id'])['Items']:
self.season(season, obj['ShowId'])
if season['SeriesId'] != obj['Id']: if season['SeriesId'] != obj['Id']:
obj['SeriesId'] = season['SeriesId'] obj['SeriesId'] = season['SeriesId']
@ -140,8 +139,14 @@ class TVShows(KodiDb):
except TypeError: except TypeError:
self.emby_db.add_reference(*values(obj, QUEM.add_reference_pool_obj)) self.emby_db.add_reference(*values(obj, QUEM.add_reference_pool_obj))
season_episodes.append(season['Id'])
LOG.info("POOL %s [%s/%s]", obj['Title'], obj['Id'], obj['SeriesId']) LOG.info("POOL %s [%s/%s]", obj['Title'], obj['Id'], obj['SeriesId'])
try:
self.emby_db.get_item_by_id(season['Id'])[0]
except TypeError:
self.season(season, obj['ShowId'])
season_episodes.append(season['Id'])
else: else:
season_id = self.get_season(*values(obj, QU.get_season_special_obj)) season_id = self.get_season(*values(obj, QU.get_season_special_obj))
self.artwork.add(obj['Artwork'], season_id, "season") self.artwork.add(obj['Artwork'], season_id, "season")