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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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) => {