Skip to content

Commit

Permalink
Revert "feat: startswith to contains for tracker messages" (#45)
Browse files Browse the repository at this point in the history
* Revert "feat: startswith to contains for tracker messages (#43)"

This reverts commit e4a5143.

* Update tagging.py
  • Loading branch information
onedr0p authored Feb 29, 2024
1 parent ab13510 commit 46bcd2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qbtools/commands/tagging.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
'trumped',
'torrent existiert nicht',
'other',
'i\'m sorry dave, i can\'t do that' # weird stuff from racingforme
'i\'m sorry dave, i can\'t do that', # weird stuff from racingforme
'002: invalid infohash'
]

MAINTENANCE_MATCHES = [
Expand Down Expand Up @@ -123,8 +124,8 @@ def __init__(args, logger):

working = len(list(filter(lambda s: s.status == 2, t.trackers))) > 0
if (args.unregistered or args.tracker_down or args.not_working) and not working:
unregistered_matched = any(x.lower() in z.msg.lower() for x in UNREGISTERED_MATCHES for z in filtered_trackers)
maintenance_matched = any(x.lower() in z.msg.lower() for x in MAINTENANCE_MATCHES for z in filtered_trackers)
unregistered_matched = any(z.msg.lower().startswith(x.lower()) for x in UNREGISTERED_MATCHES for z in filtered_trackers)
maintenance_matched = any(z.msg.lower().startswith(x.lower()) for x in MAINTENANCE_MATCHES for z in filtered_trackers)
if args.unregistered and unregistered_matched:
tags_to_add.append('unregistered')
elif args.tracker_down and maintenance_matched:
Expand Down

0 comments on commit 46bcd2c

Please sign in to comment.