Jellyfin: Skip season if no indexnumber

Signed-off-by: Luigi311 <git@luigi311.com>
pull/140/head
Luigi311 2024-01-16 04:07:40 -07:00
parent c6b026a82d
commit 6744ebcb5b
1 changed files with 7 additions and 0 deletions

View File

@ -310,6 +310,13 @@ class Jellyfin:
for seasons in seasons_watched_filtered:
if len(seasons["Items"]) > 0:
for season in seasons["Items"]:
if "IndexNumber" not in season:
logger(
f"Jellyfin: Skipping show {season.get('SeriesName')} season {season.get('Name')} as it has no index number",
3,
)
continue
season_identifiers = dict(seasons["Identifiers"])
season_identifiers["season_index"] = season["IndexNumber"]
watched_task = self.query(