Jellyfin: Skip season if no indexnumber

Signed-off-by: Luigi311 <git@luigi311.com>
This commit is contained in:
Luigi311
2024-01-16 04:07:40 -07:00
parent c6b026a82d
commit 6744ebcb5b

View File

@@ -310,6 +310,13 @@ class Jellyfin:
for seasons in seasons_watched_filtered: for seasons in seasons_watched_filtered:
if len(seasons["Items"]) > 0: if len(seasons["Items"]) > 0:
for season in seasons["Items"]: 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 = dict(seasons["Identifiers"])
season_identifiers["season_index"] = season["IndexNumber"] season_identifiers["season_index"] = season["IndexNumber"]
watched_task = self.query( watched_task = self.query(