Fix #661 show proper tracker host when ending in .co.uk, .com.au, etc..
This commit is contained in:
parent
db3a05bda4
commit
d207429f02
|
@ -520,7 +520,10 @@ class Torrent:
|
||||||
host = (url.hostname or 'DHT')
|
host = (url.hostname or 'DHT')
|
||||||
parts = host.split(".")
|
parts = host.split(".")
|
||||||
if len(parts) > 2:
|
if len(parts) > 2:
|
||||||
host = ".".join(parts[-2:])
|
if parts[-2] in ("co", "com"):
|
||||||
|
host = ".".join(parts[-3:])
|
||||||
|
else:
|
||||||
|
host = ".".join(parts[-2:])
|
||||||
return host
|
return host
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue