fix: add episodeDict setter to AnimeSeries model

SerieScanner attempted to assign serie.episodeDict = missing_episodes
but the property had no setter, causing AttributeError during scan.

Added setter that stores value in _episode_dict_cache, which the getter
already checks. This allows SerieScanner to update episodeDict directly.
This commit is contained in:
2026-06-10 20:14:15 +02:00
parent 4f61ded92a
commit e319cfecb8

View File

@@ -210,6 +210,15 @@ class AnimeSeries(Base, TimestampMixin):
episode_dict[season].append(ep.episode_number or 0) episode_dict[season].append(ep.episode_number or 0)
return episode_dict return episode_dict
@episodeDict.setter
def episodeDict(self, value: dict[int, list[int]]) -> None:
"""Set the episode dictionary via private cache.
Args:
value: Dictionary mapping season numbers to lists of episode numbers
"""
self._episode_dict_cache = value
@property @property
def name_with_year(self) -> str: def name_with_year(self) -> str:
"""Get series name with year appended if available. """Get series name with year appended if available.