mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-06 21:21:24 -07:00
WebUI: Improve accuracy of trackers list
This PR fixes various accounting issues with the trackers list. Removing a torrent would not update the trackers list, nor would removing a tracker from a torrent. And removing a tracker with a shared host but unique url (e.g. example.com/1 and example.com/2) would erroneously remove the tracker's host from the list. Closes #20053. Closes #20054. PR #20601.
This commit is contained in:
parent
eb9e98a4b3
commit
4967f977c5
3 changed files with 65 additions and 37 deletions
|
@ -1435,8 +1435,17 @@ window.qBittorrent.DynamicTable = (function() {
|
|||
break;
|
||||
default: {
|
||||
const tracker = trackerList.get(trackerHashInt);
|
||||
if (tracker && !tracker.torrents.includes(row['full_data'].rowId))
|
||||
return false;
|
||||
if (tracker) {
|
||||
let found = false;
|
||||
for (const torrents of tracker.trackerTorrentMap.values()) {
|
||||
if (torrents.includes(row['full_data'].rowId)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue