mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Fix absolute episode parsing when seasons are missing on tmdb
This commit is contained in:
parent
f0e6ee5835
commit
898e7b272e
@ -607,6 +607,10 @@ class TheMovieDatabase(Provider):
|
|||||||
# Dont forget to ingore the special season (season_number 0)
|
# Dont forget to ingore the special season (season_number 0)
|
||||||
seasons_nbrs = [x.season_number for x in show.seasons if x.season_number != 0]
|
seasons_nbrs = [x.season_number for x in show.seasons if x.season_number != 0]
|
||||||
seasons_eps = [x.episodes_count for x in show.seasons if x.season_number != 0]
|
seasons_eps = [x.episodes_count for x in show.seasons if x.season_number != 0]
|
||||||
|
|
||||||
|
if not any(seasons_nbrs):
|
||||||
|
return (None, None)
|
||||||
|
|
||||||
# zip_longest(seasons_nbrs[1:], accumulate(seasons_eps)) return [(2, 12), (None, 24)] if the show has two seasons with 12 eps
|
# zip_longest(seasons_nbrs[1:], accumulate(seasons_eps)) return [(2, 12), (None, 24)] if the show has two seasons with 12 eps
|
||||||
# we take the last group that has less total episodes than the absolute number.
|
# we take the last group that has less total episodes than the absolute number.
|
||||||
return next(
|
return next(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user