chore: merge nested if

This commit is contained in:
Edward
2024-03-05 09:35:34 +00:00
committed by GitHub
parent ac81dd943c
commit 8bcb6a7cb6

View File

@ -327,10 +327,9 @@ class TorrentHelper(metaclass=Singleton):
# 最少做种人数
min_seeders = filter_rule.get("min_seeders")
if min_seeders:
if torrent_info.seeders < int(min_seeders):
logger.info(f"{torrent_info.title} 做种人数不足 {min_seeders}")
return False
if min_seeders and torrent_info.seeders < int(min_seeders):
logger.info(f"{torrent_info.title} 做种人数不足 {min_seeders}")
return False
# 包含
include = filter_rule.get("include")
if include: