From 3f03963811bffc6f0075ed696076eba1d420a6fc Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Sat, 17 May 2025 19:44:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(themoviedb):=20=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?=E5=9C=A8=20API=20=E5=B1=82=E6=AC=A1=E5=A4=84=E7=90=86=E5=89=A7?= =?UTF-8?q?=E9=9B=86=E7=BB=84=E9=9B=86=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 season_group_details 中的冗余集号处理 --- app/modules/themoviedb/tmdbapi.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/modules/themoviedb/tmdbapi.py b/app/modules/themoviedb/tmdbapi.py index 9e74eda1..8d2e1405 100644 --- a/app/modules/themoviedb/tmdbapi.py +++ b/app/modules/themoviedb/tmdbapi.py @@ -1334,7 +1334,18 @@ class TmdbApi: return [] try: logger.debug(f"正在获取剧集组:{group_id}...") - return self.tv.group_episodes(group_id) or [] + group_seasons = self.tv.group_episodes(group_id) or [] + return [ + { + **group_season, + "episodes": [ + {**ep, "episode_number": idx} + # 剧集组中每个季的episode_number从1开始 + for idx, ep in enumerate(group_season.get("episodes", []), start=1) + ] + } + for group_season in group_seasons + ] except Exception as e: logger.error(str(e)) return [] @@ -1348,9 +1359,6 @@ class TmdbApi: return {} for group_season in group_seasons: if group_season.get('order') == season: - # 剧集组中每个季的episode_number从1开始 - for i, e in enumerate(group_season.get('episodes', []), start=1): - e['episode_number'] = i return group_season return {} From 411b5e0ca6fad3161bfba75f70c36cc3f3d621da Mon Sep 17 00:00:00 2001 From: Attente <19653207+wikrin@users.noreply.github.com> Date: Sat, 17 May 2025 19:45:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix(database):=20=E5=B0=86=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E6=A8=A1=E6=9D=BF=E4=B8=AD=E7=9A=84=20`title`=20?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E6=9B=B4=E6=94=B9=E4=B8=BA=20`torrent=5Ftitl?= =?UTF-8?q?e`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- database/versions/89d24811e894_2_1_4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/versions/89d24811e894_2_1_4.py b/database/versions/89d24811e894_2_1_4.py index 1f34f9f8..7d20f6b7 100644 --- a/database/versions/89d24811e894_2_1_4.py +++ b/database/versions/89d24811e894_2_1_4.py @@ -37,7 +37,7 @@ def upgrade() -> None: 'text': '{% if site_name %}站点:{{ site_name }}{% endif %}' '{% if resource_term %}\\n质量:{{ resource_term }}{% endif %}' '{% if size %}\\n大小:{{ size }}{% endif %}' - '{% if title %}\\n种子:{{ title }}{% endif %}' + '{% if torrent_title %}\\n种子:{{ torrent_title }}{% endif %}' '{% if pubdate %}\\n发布时间:{{ pubdate }}{% endif %}' '{% if freedate %}\\n免费时间:{{ freedate }}{% endif %}' '{% if seeders %}\\n做种数:{{ seeders }}{% endif %}'