From 67cccb0bc843c4bc2df2ca4fb4d041aea7d7ff03 Mon Sep 17 00:00:00 2001 From: ali Date: Thu, 19 Nov 2026 17:33:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(tmdb):=20=E7=89=B9=E5=88=AB=E5=AD=A3=20Seas?= =?UTF-8?q?on=2000=20=E7=9A=84=E5=B9=B4=E4=BB=BD=E6=94=B9=E7=94=A8=20TMDB?= =?UTF-8?q?=20=E5=AE=9E=E9=99=85=E9=A6=96=E6=92=AD=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 取消早期「Season 00 年份强制等于 Season 01」的规则,一律以 TMDB 各季 air_date 为准(如《我的三体》特别篇 2019 / 第一季 2014) - 已按新规则刷新缓存中 31 个含特别季的剧集,其中 13 个的 00 年份发生变化 (老友记 1994→2001、爱情公寓 2009→2015、花儿与少年 2014→2022 等) --- media/src/core/tmdb_store.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/media/src/core/tmdb_store.py b/media/src/core/tmdb_store.py index 185e377..2de17f8 100644 --- a/media/src/core/tmdb_store.py +++ b/media/src/core/tmdb_store.py @@ -139,7 +139,8 @@ def _year_of(payload: dict) -> int | None: def season_years_from(payload: dict) -> dict[str, str]: """从 /tv/{id} 的 seasons 数组生成 {"01": "2023"}。 - 特别季 Season 00 的 air_date 通常散落各年,统一取 Season 01 的年份。 + 一律以 TMDB 各季的 air_date 为准,特别季 Season 00 也不例外 + (例如《我的三体》特别篇 2019,第一季 2014)。 """ out: dict[str, str] = {} for season in payload.get("seasons") or []: @@ -150,8 +151,6 @@ def season_years_from(payload: dict) -> dict[str, str]: air = (season.get("air_date") or "").strip() if len(air) >= 4 and air[:4].isdigit(): out[num] = air[:4] - if "00" in out and "01" in out: - out["00"] = out["01"] return out