mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
revert: absolute numbered season pack locating (#5869)
This commit is contained in:
+6
-18
@@ -554,14 +554,6 @@ class DownloadChain(ChainBase):
|
||||
effective &= set(allowed)
|
||||
return effective
|
||||
|
||||
def __get_located_target_episodes(_context: Context) -> Set[int]:
|
||||
"""
|
||||
返回集数定位后的目标季内集数;缺失定位不扩大候选范围。
|
||||
"""
|
||||
if not _context.located_episodes:
|
||||
return set()
|
||||
return set(_context.located_episodes)
|
||||
|
||||
def __get_movie_download_key(_context: Context) -> str:
|
||||
"""
|
||||
获取电影下载去重键,确保失败候选不会阻断后续同名资源尝试。
|
||||
@@ -640,9 +632,8 @@ class DownloadChain(ChainBase):
|
||||
# 没有季的默认为第1季
|
||||
if not torrent_season:
|
||||
torrent_season = [1]
|
||||
# 常规标题带集数的资源不走整季路径;已完成高置信集数定位的候选仍需打开种子文件确认。
|
||||
located_target_episodes = __get_located_target_episodes(context)
|
||||
if meta.episode_list and not located_target_episodes:
|
||||
# 种子有集的不要
|
||||
if meta.episode_list:
|
||||
continue
|
||||
# 匹配TMDBID
|
||||
if need_mid == media.tmdb_id or need_mid == media.douban_id:
|
||||
@@ -763,9 +754,8 @@ class DownloadChain(ChainBase):
|
||||
# 只处理单季含集的种子
|
||||
if len(torrent_season) != 1 or torrent_season[0] != need_season:
|
||||
continue
|
||||
# 种子集列表;累计总集编号等场景优先使用订阅阶段定位出的季内目标集。
|
||||
located_target_episodes = __get_located_target_episodes(context)
|
||||
torrent_episodes = located_target_episodes or set(meta.episode_list)
|
||||
# 种子集列表
|
||||
torrent_episodes = set(meta.episode_list)
|
||||
# 整季的不处理
|
||||
if not torrent_episodes:
|
||||
continue
|
||||
@@ -847,12 +837,10 @@ class DownloadChain(ChainBase):
|
||||
effective_need = __apply_allowed_episodes(need_episodes, context)
|
||||
if not effective_need:
|
||||
continue
|
||||
located_target_episodes = __get_located_target_episodes(context)
|
||||
match_episode_candidates = located_target_episodes or set(meta.episode_list)
|
||||
# 选中一个单季整季的或单季包括需要的所有集的
|
||||
if (media.tmdb_id == need_mid or media.douban_id == need_mid) \
|
||||
and (not match_episode_candidates
|
||||
or match_episode_candidates.intersection(effective_need)) \
|
||||
and (not meta.episode_list
|
||||
or set(meta.episode_list).intersection(effective_need)) \
|
||||
and len(meta.season_list) == 1 \
|
||||
and meta.season_list[0] == need_season:
|
||||
# 检查种子看是否有需要的集
|
||||
|
||||
Reference in New Issue
Block a user