From 86f9184320db00a7ccc515d09b1515d91b7351dd Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Mon, 22 Dec 2008 10:07:39 +0000 Subject: [PATCH] Fix #661 show proper tracker host when ending in .co.uk, .com.au, etc.. --- deluge/core/torrent.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index 20fbe4502..07e4589b6 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -521,7 +521,10 @@ class Torrent: host = (url.hostname or 'DHT') parts = host.split(".") 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 ""