This commit is contained in:
Baptiste Roux 2022-02-19 13:28:12 +01:00
parent 3cd4d93d7f
commit 7af14f2f8f
No known key found for this signature in database
GPG key ID: F2D53AA58807C6B5

View file

@ -304,7 +304,7 @@ def parseSeasonNo(seasonNo, traktShowObj):
# Otherwise, if the Trakt seasons start with no specials, then return the seasonNo, # Otherwise, if the Trakt seasons start with no specials, then return the seasonNo,
# but subtracted by one (e.g Season 1 in TV Time, will be 0) # but subtracted by one (e.g Season 1 in TV Time, will be 0)
else: else:
# Only subtract is the TV Time season number is greater than 0. # Only subtract if the TV Time season number is greater than 0.
if seasonNo != 0: if seasonNo != 0:
return seasonNo - 1 return seasonNo - 1
# Otherwise, the TV Time season is a special! Then you don't need to change the starting position # Otherwise, the TV Time season is a special! Then you don't need to change the starting position
@ -399,8 +399,9 @@ def processWatchedShows():
# an incorrect Trakt show has been selected, with season/episodes which don't match TV Time. # an incorrect Trakt show has been selected, with season/episodes which don't match TV Time.
# It can also occur due to a bug in Trakt Py, whereby some seasons contain an empty array of episodes. # It can also occur due to a bug in Trakt Py, whereby some seasons contain an empty array of episodes.
except IndexError: except IndexError:
tvShowSlug = traktShowObj.to_json()['shows'][0]['ids']['ids']['slug']
logging.warning( logging.warning(
f"({rowsCount}/{rowsTotal}) WARNING: {tvShowName} Season {tvShowSeasonNo}, Episode {tvShowEpisodeNo} does not exist (season/episode index) in Trakt!" f"({rowsCount}/{rowsTotal}) WARNING: {tvShowName} Season {tvShowSeasonNo}, Episode {tvShowEpisodeNo} does not exist in Trakt! (https://trakt.tv/shows/{tvShowSlug}/seasons/{tvShowSeasonNo}/episodes/{tvShowEpisodeNo})"
) )
break break
# Catch any errors which are raised because a show could not be found in Trakt # Catch any errors which are raised because a show could not be found in Trakt