fix #267 电影年份匹配上下浮动1年
This commit is contained in:
parent
f52deb3ff2
commit
4b91510695
@ -189,14 +189,16 @@ class SearchChain(ChainBase):
|
|||||||
# 比对年份
|
# 比对年份
|
||||||
if mediainfo.year:
|
if mediainfo.year:
|
||||||
if mediainfo.type == MediaType.TV:
|
if mediainfo.type == MediaType.TV:
|
||||||
# 需要剧集
|
# 剧集年份,每季的年份可能不同
|
||||||
if torrent_meta.year and torrent_meta.year not in [year for year in
|
if torrent_meta.year and torrent_meta.year not in [year for year in
|
||||||
mediainfo.season_years.values()]:
|
mediainfo.season_years.values()]:
|
||||||
logger.warn(f'{torrent.site_name} - {torrent.title} 年份不匹配')
|
logger.warn(f'{torrent.site_name} - {torrent.title} 年份不匹配')
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
# 需要电影
|
# 电影年份,上下浮动1年
|
||||||
if torrent_meta.year != mediainfo.year:
|
if torrent_meta.year not in [str(int(mediainfo.year) - 1),
|
||||||
|
mediainfo.year,
|
||||||
|
str(int(mediainfo.year) + 1)]:
|
||||||
logger.warn(f'{torrent.site_name} - {torrent.title} 年份不匹配')
|
logger.warn(f'{torrent.site_name} - {torrent.title} 年份不匹配')
|
||||||
continue
|
continue
|
||||||
# 比对标题
|
# 比对标题
|
||||||
|
Loading…
x
Reference in New Issue
Block a user