Skip to content

Commit

Permalink
Merge pull request #2937 from thsrite/v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp authored Oct 25, 2024
2 parents e2ee930 + dc3240e commit 1651f46
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/modules/filter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,10 @@ def __match_rule(self, torrent: TorrentInfo, rule_name: str) -> bool:
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):
# 发现排除项
Expand Down

0 comments on commit 1651f46

Please sign in to comment.