Add default_policy to class
MODIFY
plextraktsync/config/HttpCacheConfig.py
plextraktsync/config/HttpCacheConfig.py
@@ -17,6 +17,21 @@ class HttpCacheConfig:
policy: Dict[str]
+ default_policy = {
+ # Requests matching these patterns will not be cached
+ "*.trakt.tv/shows/*/seasons": 0,
+ "*.trakt.tv/sync/collection/shows": 0,
+ "*.trakt.tv/sync/watched/shows": 0,
+ "*.trakt.tv/users/*/collection/movies": 0,
+ "*.trakt.tv/users/*/collection/shows": 0,
+ "*.trakt.tv/users/*/ratings/*": 0,
+ "*.trakt.tv/users/*/watched/movies": 0,
+ "*.trakt.tv/users/*/watchlist/movies": 0,
+ "*.trakt.tv/users/*/watchlist/shows": 0,
+ "*.trakt.tv/users/likes/lists": 0,
+ "*.trakt.tv/users/me": 0,
+ }
+
@property
def urls_expire_after(self) -> ExpirationPatterns:
"""
@@ -26,4 +41,5 @@ def urls_expire_after(self) -> ExpirationPatterns:
NOTE: If there is more than one match, the first match will be used in the order they are defined
"""
- return self.policy
+
+ return {**self.default_policy, **self.policy}

Add default_policy to class