Allow tracker list to be extended by plugins

This commit is contained in:
shortcutme 2018-08-26 02:53:39 +02:00
parent 7738e6a381
commit 65f48800b9
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -32,8 +32,11 @@ class SiteAnnouncer(object):
self.last_tracker_id = random.randint(0, 10)
self.time_last_announce = 0
def getTrackers(self):
return config.trackers
def getSupportedTrackers(self):
trackers = config.trackers
trackers = self.getTrackers()
if config.disable_udp or config.trackers_proxy != "disable":
trackers = [tracker for tracker in trackers if not tracker.startswith("udp://")]