Skip to content

Commit

Permalink
fix: only announce if zero working trackers
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Aug 30, 2024
1 parent dd5755d commit 06c56c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qbtools/commands/reannounce.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion qbtools/commands/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 06c56c2

Please sign in to comment.