mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
fix(ci): keep subscribe match complexity within ratchet
This commit is contained in:
+26
-10
@@ -2027,17 +2027,11 @@ class SubscribeChain(MusicSubscribeMixin, InteractionChainMixin, ChainBase):
|
|||||||
)[1]:
|
)[1]:
|
||||||
logger.debug(
|
logger.debug(
|
||||||
f'{torrent_info.site_name} - {torrent_info.title} 重新识别失败,尝试通过标题匹配...')
|
f'{torrent_info.site_name} - {torrent_info.title} 重新识别失败,尝试通过标题匹配...')
|
||||||
if TorrentHelper.match_torrent(mediainfo=mediainfo,
|
if not self.__is_title_match_allowed(
|
||||||
torrent_meta=torrent_meta,
|
|
||||||
torrent=torrent_info):
|
|
||||||
if TorrentHelper.requires_identity_disambiguation(
|
|
||||||
mediainfo=mediainfo,
|
mediainfo=mediainfo,
|
||||||
torrent_meta=torrent_meta,
|
torrent_meta=torrent_meta,
|
||||||
|
torrent_info=torrent_info,
|
||||||
):
|
):
|
||||||
logger.info(
|
|
||||||
f'{torrent_info.site_name} - {torrent_info.title} '
|
|
||||||
f'仅通过无年份别名命中且候选媒体身份无法确认,已跳过'
|
|
||||||
)
|
|
||||||
continue
|
continue
|
||||||
# 匹配成功
|
# 匹配成功
|
||||||
logger.info(
|
logger.info(
|
||||||
@@ -2048,8 +2042,6 @@ class SubscribeChain(MusicSubscribeMixin, InteractionChainMixin, ChainBase):
|
|||||||
_context.match_source = "title"
|
_context.match_source = "title"
|
||||||
_context.candidate_recognized = False
|
_context.candidate_recognized = False
|
||||||
_context.media_info_is_target = True
|
_context.media_info_is_target = True
|
||||||
else:
|
|
||||||
continue
|
|
||||||
|
|
||||||
# 直接比对媒体信息
|
# 直接比对媒体信息
|
||||||
if torrent_mediainfo and resolve_media_identity(
|
if torrent_mediainfo and resolve_media_identity(
|
||||||
@@ -3779,6 +3771,30 @@ class SubscribeChain(MusicSubscribeMixin, InteractionChainMixin, ChainBase):
|
|||||||
return str(media_source)
|
return str(media_source)
|
||||||
return "unknown"
|
return "unknown"
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def __is_title_match_allowed(
|
||||||
|
mediainfo: MediaInfo,
|
||||||
|
torrent_meta: MetaBase,
|
||||||
|
torrent_info: TorrentInfo,
|
||||||
|
) -> bool:
|
||||||
|
"""判断资源是否可以通过标题兜底匹配订阅目标。"""
|
||||||
|
if not TorrentHelper.match_torrent(
|
||||||
|
mediainfo=mediainfo,
|
||||||
|
torrent_meta=torrent_meta,
|
||||||
|
torrent=torrent_info,
|
||||||
|
):
|
||||||
|
return False
|
||||||
|
if not TorrentHelper.requires_identity_disambiguation(
|
||||||
|
mediainfo=mediainfo,
|
||||||
|
torrent_meta=torrent_meta,
|
||||||
|
):
|
||||||
|
return True
|
||||||
|
logger.info(
|
||||||
|
f'{torrent_info.site_name} - {torrent_info.title} '
|
||||||
|
f'仅通过无年份别名命中且候选媒体身份无法确认,已跳过'
|
||||||
|
)
|
||||||
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def __reconcile_candidate_media(
|
def __reconcile_candidate_media(
|
||||||
target_mediainfo: MediaInfo,
|
target_mediainfo: MediaInfo,
|
||||||
|
|||||||
Reference in New Issue
Block a user