diff --git a/server/entertainment_decider/extractors/collection/base.py b/server/entertainment_decider/extractors/collection/base.py index e72276c..af1dba3 100644 --- a/server/entertainment_decider/extractors/collection/base.py +++ b/server/entertainment_decider/extractors/collection/base.py @@ -27,11 +27,15 @@ class CollectionExtractor(GeneralExtractor[MediaCollection, T]): return elem return None + def __configure_collection(self, collection: MediaCollection) -> None: + collection.keep_updated = True + def _create_object(self, data: ExtractedData[T]) -> MediaCollection: collection = data.create_collection() return collection def _load_object(self, data: ExtractedData[T]) -> MediaCollection: collection = data.load_collection() - collection.keep_updated = True + if collection: + self.__configure_collection(collection) return collection