From dc3240e90a0a12dbfeebba00bc5a8532a9ecf31b Mon Sep 17 00:00:00 2001 From: thsrite Date: Fri, 25 Oct 2024 16:05:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=A7=8D=E5=AD=90=E8=BF=87=E6=BB=A4?= =?UTF-8?q?=E5=8C=85=E5=90=AB=E8=A7=84=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/filter/__init__.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/modules/filter/__init__.py b/app/modules/filter/__init__.py index e3983ea7..77280707 100644 --- a/app/modules/filter/__init__.py +++ b/app/modules/filter/__init__.py @@ -359,11 +359,10 @@ class FilterModule(_ModuleBase): seeders = self.rule_set[rule_name].get("seeders") # FREE规则 downloadvolumefactor = self.rule_set[rule_name].get("downloadvolumefactor") - for include in includes: - if not re.search(r"%s" % include, content, re.IGNORECASE): - # 未发现包含项 - logger.debug(f"种子 {torrent.site_name} - {torrent.title} 不包含 {include}") - return False + if not any(re.search(r"%s" % include, content, re.IGNORECASE) for include in includes): + # 未发现任何包含项 + logger.debug(f"种子 {torrent.site_name} - {torrent.title} 不包含任何项 {includes}") + return False for exclude in excludes: if re.search(r"%s" % exclude, content, re.IGNORECASE): # 发现排除项