diff --git a/plugins/TrackerShare/TrackerSharePlugin.py b/plugins/TrackerShare/TrackerSharePlugin.py index 558163ed..156f7fd2 100644 --- a/plugins/TrackerShare/TrackerSharePlugin.py +++ b/plugins/TrackerShare/TrackerSharePlugin.py @@ -75,6 +75,9 @@ class TrackerStorage(object): if not self.isTrackerAddressValid(address): del trackers[address] + def isUdpEnabled(self): + return not (config.disable_udp or config.trackers_proxy != "disable") + def getNormalizedTrackerProtocol(self, tracker_address): if not self.site_announcer: return None @@ -111,6 +114,8 @@ class TrackerStorage(object): protocol = self.getNormalizedTrackerProtocol(tracker_address) if not protocol: continue + if protocol == "udp" and not self.isUdpEnabled(): + continue protocols.add(protocol) protocols = list(protocols)