mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-07-08 22:15:04 +08:00
Merge pull request #4297 from wikrin/v2
This commit is contained in:
@@ -1334,7 +1334,18 @@ class TmdbApi:
|
|||||||
return []
|
return []
|
||||||
try:
|
try:
|
||||||
logger.debug(f"正在获取剧集组:{group_id}...")
|
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:
|
except Exception as e:
|
||||||
logger.error(str(e))
|
logger.error(str(e))
|
||||||
return []
|
return []
|
||||||
@@ -1348,9 +1359,6 @@ class TmdbApi:
|
|||||||
return {}
|
return {}
|
||||||
for group_season in group_seasons:
|
for group_season in group_seasons:
|
||||||
if group_season.get('order') == season:
|
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 group_season
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ def upgrade() -> None:
|
|||||||
'text': '{% if site_name %}站点:{{ site_name }}{% endif %}'
|
'text': '{% if site_name %}站点:{{ site_name }}{% endif %}'
|
||||||
'{% if resource_term %}\\n质量:{{ resource_term }}{% endif %}'
|
'{% if resource_term %}\\n质量:{{ resource_term }}{% endif %}'
|
||||||
'{% if size %}\\n大小:{{ size }}{% endif %}'
|
'{% if size %}\\n大小:{{ size }}{% endif %}'
|
||||||
'{% if title %}\\n种子:{{ title }}{% endif %}'
|
'{% if torrent_title %}\\n种子:{{ torrent_title }}{% endif %}'
|
||||||
'{% if pubdate %}\\n发布时间:{{ pubdate }}{% endif %}'
|
'{% if pubdate %}\\n发布时间:{{ pubdate }}{% endif %}'
|
||||||
'{% if freedate %}\\n免费时间:{{ freedate }}{% endif %}'
|
'{% if freedate %}\\n免费时间:{{ freedate }}{% endif %}'
|
||||||
'{% if seeders %}\\n做种数:{{ seeders }}{% endif %}'
|
'{% if seeders %}\\n做种数:{{ seeders }}{% endif %}'
|
||||||
|
|||||||
Reference in New Issue
Block a user