refactor(tmdb): 空结果缓存过期时间收敛为设置项 EMPTY_RESULT_CACHE_TTL

- ConfigModel TMDB 配置区新增 EMPTY_RESULT_CACHE_TTL(默认 30 分钟),支持环境变量覆盖
- request/async_request/discover/TmdbCache 统一改读 settings,移除模块级常量与跨模块导入
This commit is contained in:
jxxghp
2026-08-16 21:20:32 +08:00
parent 2aca9cc06b
commit 1402626a4a
6 changed files with 20 additions and 24 deletions
+2
View File
@@ -255,6 +255,8 @@ class ConfigModel(BaseModel):
TMDB_API_DOMAIN: str = "api.themoviedb.org"
# TMDB元数据语言
TMDB_LOCALE: str = "zh"
# TMDB空结果缓存独立过期时间(秒),故障期间产生的空响应快速过期,故障自愈后可自然恢复
EMPTY_RESULT_CACHE_TTL: int = 30 * 60
# 刮削使用TMDB原始语种图片
TMDB_SCRAP_ORIGINAL_IMAGE: bool = False
# TMDB API Key