Fix librarysync key error

This commit is contained in:
tomkat83 2016-03-11 14:47:41 +01:00
parent 57f10ee1f4
commit 9097f06392
2 changed files with 11 additions and 10 deletions

View file

@ -1821,10 +1821,10 @@ class API():
]
"""
item = self.item.attrib
key = item['grandparentRatingKey']
title = item['grandparentTitle']
season = item['parentIndex']
episode = item['index']
key = item.get('grandparentRatingKey')
title = item.get('grandparentTitle')
season = item.get('parentIndex')
episode = item.get('index')
return key, title, season, episode
def addPlexHeadersToUrl(self, url, arguments={}):

View file

@ -1258,12 +1258,13 @@ class TVShows(Items):
seriesId, seriesName, season, episode = API.getEpisodeDetails()
if season is None:
if item.get('AbsoluteEpisodeNumber'):
# Anime scenario
season = 1
episode = item['AbsoluteEpisodeNumber']
else:
season = -1
# if item.get('AbsoluteEpisodeNumber'):
# # Anime scenario
# season = 1
# episode = item['AbsoluteEpisodeNumber']
# else:
# season = -1
# Specials ordering within season
if item.get('AirsAfterSeasonNumber'):