diff --git a/qbtools/commands/reannounce.py b/qbtools/commands/reannounce.py index 6c7ae7d..33e1276 100755 --- a/qbtools/commands/reannounce.py +++ b/qbtools/commands/reannounce.py @@ -21,8 +21,8 @@ def process_torrents(status): torrents_retries.clear() for t in torrents: - not_working = list(filter(lambda s: s.status == 4, t.trackers)) - if not not_working: + working = any([s.status == 2 for s in t.trackers]) + if working: continue peers = t.num_seeds + t.num_leechs diff --git a/qbtools/commands/tagging.py b/qbtools/commands/tagging.py index 97340e9..5dd5aa4 100755 --- a/qbtools/commands/tagging.py +++ b/qbtools/commands/tagging.py @@ -124,7 +124,7 @@ def __init__(args, logger): if args.domains: tags_to_add.append(f"domain:{domain}") - working = len(list(filter(lambda s: s.status == 2, t.trackers))) > 0 + working = any([s.status == 2 for s in t.trackers]) if (args.unregistered or args.tracker_down or args.not_working) and not working: unregistered_matched = any( z.msg.lower().startswith(x.lower())