fix: 优先使用id作为cache key避免key冲突

This commit is contained in:
Akimio521
2024-11-08 10:35:29 +08:00
parent 28f6e7f9bb
commit d42bd14288
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -52,7 +52,7 @@ class DoubanCache(metaclass=Singleton):
获取缓存KEY 获取缓存KEY
""" """
return f"[{meta.type.value if meta.type else '未知'}]" \ return f"[{meta.type.value if meta.type else '未知'}]" \
f"{meta.name or meta.doubanid}-{meta.year}-{meta.begin_season}" f"{meta.doubanid or meta.name}-{meta.year}-{meta.begin_season}"
def get(self, meta: MetaBase): def get(self, meta: MetaBase):
""" """
+1 -1
View File
@@ -50,7 +50,7 @@ class TmdbCache(metaclass=Singleton):
""" """
获取缓存KEY 获取缓存KEY
""" """
return f"[{meta.type.value if meta.type else '未知'}]{meta.name or meta.tmdbid}-{meta.year}-{meta.begin_season}" return f"[{meta.type.value if meta.type else '未知'}]{meta.tmdbid or meta.name}-{meta.year}-{meta.begin_season}"
def get(self, meta: MetaBase): def get(self, meta: MetaBase):
""" """