Use year to filter tv series

This commit is contained in:
Zoe Roux 2023-09-05 23:04:24 +02:00
parent 13ef0ba14a
commit 83a91eea97
3 changed files with 6 additions and 0 deletions

View File

@ -306,6 +306,7 @@ class TheMovieDatabase(Provider):
season: Optional[int],
episode_nbr: Optional[int],
absolute: Optional[int],
year: Optional[int],
*,
language: list[str],
) -> Episode:

View File

@ -52,6 +52,7 @@ class Provider:
season: Optional[int],
episode_nbr: Optional[int],
absolute: Optional[int],
year: Optional[int],
*,
language: list[str]
) -> Episode:

View File

@ -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)