mirror of
https://github.com/SinTan1729/TvTimeToTrakt.git
synced 2024-12-25 21:08:37 -06:00
Debug wrong season returned, fixed by https://github.com/moogar0880/PyTrakt/pull/197
This commit is contained in:
parent
3cd4d93d7f
commit
7af14f2f8f
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue