From 9fdcf52225f3322c7ecdbc317fd65dce6a556a4b Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sat, 5 Aug 2023 23:33:51 +0800 Subject: [PATCH] fix --- app/chain/search.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/chain/search.py b/app/chain/search.py index 2e91bae8..861c572f 100644 --- a/app/chain/search.py +++ b/app/chain/search.py @@ -171,17 +171,16 @@ class SearchChain(ChainBase): # 识别 torrent_meta = MetaInfo(title=torrent.title, subtitle=torrent.description) # 比对类型 - if torrent_meta.type == MediaType.TV and mediainfo.type != MediaType.TV: + if (torrent_meta.type == MediaType.TV and mediainfo.type != MediaType.TV) \ + or (torrent_meta.type != MediaType.TV and mediainfo.type == MediaType.TV): logger.warn(f'{torrent.site_name} - {torrent.title} 类型不匹配') continue # 比对年份 if mediainfo.year: if mediainfo.type == MediaType.TV: # 需要剧集 - if torrent_meta.type != MediaType.TV and not torrent_meta.year: - logger.warn(f'{torrent.site_name} - {torrent.title} 类型不确定且没有年份') - continue - if torrent_meta.year and torrent_meta.year not in [year for year in mediainfo.season_years.values()]: + if torrent_meta.year and torrent_meta.year not in [year for year in + mediainfo.season_years.values()]: logger.warn(f'{torrent.site_name} - {torrent.title} 年份不匹配') continue else: