From 931a42e981a9069209d17aa47e31ed7b76bfbb93 Mon Sep 17 00:00:00 2001 From: REinject <22788893+0xlane@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:26:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(tmdbapi):=20=E4=BF=AE=E5=A4=8D=E6=8C=89?= =?UTF-8?q?=E5=AD=A3=E6=90=9C=E7=B4=A2=E5=89=A7=E9=9B=86=E7=9A=84=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8C=B9=E9=85=8D=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/themoviedb/tmdbapi.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/modules/themoviedb/tmdbapi.py b/app/modules/themoviedb/tmdbapi.py index f123293c..9503f166 100644 --- a/app/modules/themoviedb/tmdbapi.py +++ b/app/modules/themoviedb/tmdbapi.py @@ -643,17 +643,23 @@ class TmdbApi: reverse=True ) for tv in tvs: - # 年份 + # 使用年份、名称匹配 tv_year = tv.get('first_air_date')[0:4] if tv.get('first_air_date') else None if (self.__compare_names(name, tv.get('name')) or self.__compare_names(name, tv.get('original_name'))) \ and (tv_year == str(season_year)): return tv - # 匹配别名、译名 + # 获取别名、译名重新匹配 if not tv.get("names"): tv = self.get_info(mtype=MediaType.TV, tmdbid=tv.get("id")) - if not tv or not self.__compare_names(name, tv.get("names")): + if not tv or not ( + self.__compare_names(name, tv.get("name")) + or self.__compare_names(name, tv.get("original_name")) + or self.__compare_names(name, tv.get("names"))): continue + if tv_year == str(season_year): + return tv + # 季年份匹配 if __season_match(tv_info=tv, _season_year=season_year): return tv return {}