Merge pull request #328 from buthed010203/patch-1

Allow defining multiple announce urls for one tracker
This commit is contained in:
bobokun 2023-06-11 17:21:06 -04:00 committed by GitHub
commit 1169ef39fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View file

@ -2,6 +2,7 @@
# New Features
- cross-seed will move torrent to an error folder if it fails to inject torrent
- Define multiple announce urls for one tracker (#328 Thanks to @buthed010203 for the PR)
# Bug Fixes
- Fixes #329 (Updates missing share_limits tag even when share_limits are satisfied)

View file

@ -1 +1 @@
4.0.1-develop4
4.0.1-develop5

View file

@ -67,7 +67,7 @@ cat_change:
tracker:
# Mandatory
# Tag Parameters
# <Tracker URL Keyword>: # <MANDATORY> This is the keyword in the tracker url
# <Tracker URL Keyword>: # <MANDATORY> This is the keyword in the tracker url. You can define multiple tracker urls by splitting with `|` delimiter
# <MANDATORY> Set tag name. Can be a list of tags or a single tag
# tag: <Tag Name>
# <OPTIONAL> Set this to the notifiarr react name. This is used to add indexer reactions to the notifications sent by Notifiarr
@ -107,13 +107,10 @@ tracker:
privatehd:
tag: PrivateHD
notifiarr:
tleechreload:
tag: TorrentLeech
notifiarr: torrentleech
torrentdb:
tag: TorrentDB
notifiarr: torrentdb
torrentleech:
torrentleech|tleechreload:
tag: TorrentLeech
notifiarr: torrentleech
tv-vault:

View file

@ -100,7 +100,12 @@ class Config:
if "cat_change" in self.data:
self.data["cat_change"] = self.data.pop("cat_change")
if "tracker" in self.data:
self.data["tracker"] = self.data.pop("tracker")
trackers = self.data.pop("tracker")
self.data["tracker"] = {}
# Splits tracker urls at pipes, useful for trackers with multiple announce urls
for tracker_urls, data in trackers.items():
for tracker_url in tracker_urls.split("|"):
self.data["tracker"][tracker_url.strip()] = data
else:
self.data["tracker"] = {}
if "nohardlinks" in self.data: