From 7c8eadfddfebe780d4d145d46e15bc60224bbca2 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 10 Oct 2021 11:00:21 +0800 Subject: [PATCH] Revert "WebUI: group trackers by hostname" This functionality wasn't ever correctly implemented and couldn't be done without considerable effort, so revert it for now. This reverts commit 4ac25a50ede9526f89e0fa54bbdabe83e8ec72aa. PR #15542. --- src/webui/www/private/scripts/client.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/webui/www/private/scripts/client.js b/src/webui/www/private/scripts/client.js index a0b3e877d..5d77a5985 100644 --- a/src/webui/www/private/scripts/client.js +++ b/src/webui/www/private/scripts/client.js @@ -97,15 +97,6 @@ function genHash(string) { return hash; } -function getTrackerHost(url) { - try { - return new URL(url).hostname; - } - catch (error) { - return url; - } -} - function getSyncMainDataInterval() { return customSyncMainDataInterval ? customSyncMainDataInterval : serverSyncMainDataInterval; } @@ -632,10 +623,9 @@ window.addEvent('load', function() { if (response['trackers']) { for (const tracker in response['trackers']) { const torrents = response['trackers'][tracker]; - const host = getTrackerHost(tracker); - const hash = genHash(host); + const hash = genHash(tracker); trackerList.set(hash, { - url: host, + url: tracker, torrents: torrents }); }