mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -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],
|
season: Optional[int],
|
||||||
episode_nbr: Optional[int],
|
episode_nbr: Optional[int],
|
||||||
absolute: Optional[int],
|
absolute: Optional[int],
|
||||||
|
year: Optional[int],
|
||||||
*,
|
*,
|
||||||
language: list[str],
|
language: list[str],
|
||||||
) -> Episode:
|
) -> Episode:
|
||||||
|
@ -52,6 +52,7 @@ class Provider:
|
|||||||
season: Optional[int],
|
season: Optional[int],
|
||||||
episode_nbr: Optional[int],
|
episode_nbr: Optional[int],
|
||||||
absolute: Optional[int],
|
absolute: Optional[int],
|
||||||
|
year: Optional[int],
|
||||||
*,
|
*,
|
||||||
language: list[str]
|
language: list[str]
|
||||||
) -> Episode:
|
) -> Episode:
|
||||||
|
@ -77,6 +77,9 @@ class Scanner:
|
|||||||
|
|
||||||
if not "mimetype" in raw or not raw["mimetype"].startswith("video"):
|
if not "mimetype" in raw or not raw["mimetype"].startswith("video"):
|
||||||
return
|
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)
|
logging.info("Identied %s: %s", path, raw)
|
||||||
|
|
||||||
@ -94,6 +97,7 @@ class Scanner:
|
|||||||
season=raw.get("season"),
|
season=raw.get("season"),
|
||||||
episode_nbr=raw.get("episode"),
|
episode_nbr=raw.get("episode"),
|
||||||
absolute=raw.get("episode") if "season" not in raw else None,
|
absolute=raw.get("episode") if "season" not in raw else None,
|
||||||
|
year=raw.get("year"),
|
||||||
language=self.languages,
|
language=self.languages,
|
||||||
)
|
)
|
||||||
episode.path = str(path)
|
episode.path = str(path)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user