Support removing tracker from all torrents in WebUI/WebAPI

Closes #20661.
PR #21056.
This commit is contained in:
Thomas Piccirello
2024-09-16 02:47:10 -07:00
committed by GitHub
parent d19f7b12d9
commit d2b2afad23
8 changed files with 132 additions and 8 deletions

View File

@@ -644,6 +644,12 @@ window.addEventListener("DOMContentLoaded", () => {
trackerFilterList.appendChild(createLink(TRACKERS_ALL, "QBT_TR(All (%1))QBT_TR[CONTEXT=TrackerFiltersList]", torrentsCount));
trackerFilterList.appendChild(createLink(TRACKERS_TRACKERLESS, "QBT_TR(Trackerless (%1))QBT_TR[CONTEXT=TrackerFiltersList]", trackerlessTorrentsCount));
// Remove unused trackers
for (const [key, { trackerTorrentMap }] of trackerList) {
if (trackerTorrentMap.size === 0)
trackerList.delete(key);
}
// Sort trackers by hostname
const sortedList = [];
trackerList.forEach(({ host, trackerTorrentMap }, hash) => {