mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Use year to filter tv series
This commit is contained in:
parent
13ef0ba14a
commit
83a91eea97
@ -306,6 +306,7 @@ class TheMovieDatabase(Provider):
|
||||
season: Optional[int],
|
||||
episode_nbr: Optional[int],
|
||||
absolute: Optional[int],
|
||||
year: Optional[int],
|
||||
*,
|
||||
language: list[str],
|
||||
) -> Episode:
|
||||
|
@ -52,6 +52,7 @@ class Provider:
|
||||
season: Optional[int],
|
||||
episode_nbr: Optional[int],
|
||||
absolute: Optional[int],
|
||||
year: Optional[int],
|
||||
*,
|
||||
language: list[str]
|
||||
) -> Episode:
|
||||
|
@ -77,6 +77,9 @@ class Scanner:
|
||||
|
||||
if not "mimetype" in raw or not raw["mimetype"].startswith("video"):
|
||||
return
|
||||
# Remove seasons in "One Piece (1999) 152.mkv" for example
|
||||
if raw.get("season") == raw.get("year") and "season" in raw:
|
||||
del raw["season"]
|
||||
|
||||
logging.info("Identied %s: %s", path, raw)
|
||||
|
||||
@ -94,6 +97,7 @@ class Scanner:
|
||||
season=raw.get("season"),
|
||||
episode_nbr=raw.get("episode"),
|
||||
absolute=raw.get("episode") if "season" not in raw else None,
|
||||
year=raw.get("year"),
|
||||
language=self.languages,
|
||||
)
|
||||
episode.path = str(path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user