mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 14:08:03 -06:00
WebUI: Add ability to add/remove tracker from selected torrents
Closes #22618. PR #22698.
This commit is contained in:
@@ -180,6 +180,11 @@ window.qBittorrent.PropTrackers ??= (() => {
|
||||
const addTrackerFN = () => {
|
||||
if (current_hash.length === 0)
|
||||
return;
|
||||
|
||||
const selectedTorrents = torrentsTable.selectedRowsIds();
|
||||
if (selectedTorrents.length !== 0)
|
||||
current_hash = selectedTorrents.map(encodeURIComponent).join("|");
|
||||
|
||||
new MochaUI.Window({
|
||||
id: "trackersPage",
|
||||
icon: "images/qbittorrent-tray.svg",
|
||||
@@ -229,6 +234,10 @@ window.qBittorrent.PropTrackers ??= (() => {
|
||||
if (current_hash.length === 0)
|
||||
return;
|
||||
|
||||
const selectedTorrents = torrentsTable.selectedRowsIds();
|
||||
if (selectedTorrents.length !== 0)
|
||||
current_hash = selectedTorrents.map(encodeURIComponent).join("|");
|
||||
|
||||
fetch("api/v2/torrents/removeTrackers", {
|
||||
method: "POST",
|
||||
body: new URLSearchParams({
|
||||
|
||||
Reference in New Issue
Block a user