mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 05:34:23 -04:00
Fix themoviedb weird absolute
This commit is contained in:
parent
36f6cd5631
commit
4602f4ee65
@ -662,13 +662,13 @@ class TheMovieDatabase(Provider):
|
|||||||
start = next(
|
start = next(
|
||||||
(x["episode_number"] for x in absgrp if x["season_number"] == season), None
|
(x["episode_number"] for x in absgrp if x["season_number"] == season), None
|
||||||
)
|
)
|
||||||
if start is not None and start <= episode_nbr:
|
if start is None or start <= episode_nbr:
|
||||||
# add back the continuous number (imagine the user has one piece S21e31
|
raise ProviderError(
|
||||||
# but tmdb registered it as S21E831 since S21's first ep is 800
|
f"Could not guess absolute number of episode {show_id} s{season} e{episode_nbr}"
|
||||||
return await self.get_absolute_number(show_id, season, episode_nbr + start)
|
)
|
||||||
raise ProviderError(
|
# add back the continuous number (imagine the user has one piece S21e31
|
||||||
f"Could not guess absolute number of episode {show_id} s{season} e{episode_nbr}"
|
# but tmdb registered it as S21E831 since S21's first ep is 800
|
||||||
)
|
return await self.get_absolute_number(show_id, season, episode_nbr + start)
|
||||||
|
|
||||||
async def identify_collection(self, provider_id: str) -> Collection:
|
async def identify_collection(self, provider_id: str) -> Collection:
|
||||||
languages = self.get_languages()
|
languages = self.get_languages()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user