diff --git a/server/entertainment_decider/models.py b/server/entertainment_decider/models.py index 3ee7083..373a256 100644 --- a/server/entertainment_decider/models.py +++ b/server/entertainment_decider/models.py @@ -1,7 +1,7 @@ from __future__ import annotations from dataclasses import dataclass -from datetime import datetime, timedelta +from datetime import datetime import logging from typing import Dict, Iterable, List, Optional, Set @@ -130,9 +130,6 @@ class MediaElement(db.Entity): _uris: Iterable[MediaUriMapping] = orm.Set(lambda: MediaUriMapping) collection_links: Iterable[MediaCollectionLink] = orm.Set(lambda: MediaCollectionLink) - def extractor_cache_valid(self, max_age: timedelta): - return (datetime.now() - self.last_updated) < max_age - def __get_cache(self): return self._extractor_cache def __set_cache(self, cache: Dict): @@ -243,9 +240,6 @@ class MediaCollection(db.Entity): _uris: Iterable[CollectionUriMapping] = orm.Set(lambda: CollectionUriMapping) media_links: Iterable[MediaCollectionLink] = orm.Set(MediaCollectionLink) - def extractor_cache_valid(self, max_age: timedelta): - return (datetime.now() - self.last_updated) < max_age - def __get_cache(self): return self._extractor_cache def __set_cache(self, cache: Dict):