mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 08:26:53 +08:00
fix 订阅匹配缓存问题
This commit is contained in:
@@ -574,6 +574,7 @@ class SubscribeChain(ChainBase, metaclass=Singleton):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# 有自定义识别词时,需要判断是否需要重新识别
|
# 有自定义识别词时,需要判断是否需要重新识别
|
||||||
|
apply_words = None
|
||||||
if custom_words_list:
|
if custom_words_list:
|
||||||
_, apply_words = WordsMatcher().prepare(torrent_info.title,
|
_, apply_words = WordsMatcher().prepare(torrent_info.title,
|
||||||
custom_words=custom_words_list)
|
custom_words=custom_words_list)
|
||||||
@@ -593,8 +594,9 @@ class SubscribeChain(ChainBase, metaclass=Singleton):
|
|||||||
torrent_mediainfo = self.recognize_media(meta=torrent_meta)
|
torrent_mediainfo = self.recognize_media(meta=torrent_meta)
|
||||||
if torrent_mediainfo:
|
if torrent_mediainfo:
|
||||||
# 更新种子缓存
|
# 更新种子缓存
|
||||||
context.media_info = torrent_mediainfo
|
if not apply_words:
|
||||||
if not torrent_mediainfo:
|
context.media_info = torrent_mediainfo
|
||||||
|
else:
|
||||||
# 通过标题匹配兜底
|
# 通过标题匹配兜底
|
||||||
logger.warn(
|
logger.warn(
|
||||||
f'{torrent_info.site_name} - {torrent_info.title} 重新识别失败,尝试通过标题匹配...')
|
f'{torrent_info.site_name} - {torrent_info.title} 重新识别失败,尝试通过标题匹配...')
|
||||||
@@ -604,9 +606,10 @@ class SubscribeChain(ChainBase, metaclass=Singleton):
|
|||||||
# 匹配成功
|
# 匹配成功
|
||||||
logger.info(
|
logger.info(
|
||||||
f'{mediainfo.title_year} 通过标题匹配到可选资源:{torrent_info.site_name} - {torrent_info.title}')
|
f'{mediainfo.title_year} 通过标题匹配到可选资源:{torrent_info.site_name} - {torrent_info.title}')
|
||||||
# 更新种子缓存
|
|
||||||
torrent_mediainfo = mediainfo
|
torrent_mediainfo = mediainfo
|
||||||
context.media_info = mediainfo
|
# 更新种子缓存
|
||||||
|
if not apply_words:
|
||||||
|
context.media_info = mediainfo
|
||||||
else:
|
else:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user