Fix udp trackers being classified as DHT source
This commit is contained in:
parent
c5cc5c283b
commit
850807ca43
|
@ -518,7 +518,7 @@ class Torrent:
|
||||||
tracker = self.trackers[0]["url"]
|
tracker = self.trackers[0]["url"]
|
||||||
|
|
||||||
if tracker:
|
if tracker:
|
||||||
url = urlparse(tracker)
|
url = urlparse(tracker.replace("udp://", "http://"))
|
||||||
if hasattr(url, "hostname"):
|
if hasattr(url, "hostname"):
|
||||||
host = (url.hostname or 'DHT')
|
host = (url.hostname or 'DHT')
|
||||||
# Check if hostname is an IP address and just return it if that's the case
|
# Check if hostname is an IP address and just return it if that's the case
|
||||||
|
|
Loading…
Reference in New Issue