qBittorrent icon indicating copy to clipboard operation
qBittorrent copied to clipboard

WebUI: Add ability to add/remove tracker from selected torrents

Open userwiths opened this issue 6 months ago • 4 comments

Closes #22618.

Currently, I believe, the API for tracker addition/removal supports either one torrent (torrent's Id is passed in hash argument) or all torrents (hash is *).

The proposed changes allow for the passing of a list of hashes separated by a |, just like we pass multiple trackers.

I'm not 100% sure how we approach api changes/tweaks, so I expect there are steps ive probably missed (api version bump?). Would be happy to address them if someone points them out.

userwiths avatar May 12 '25 12:05 userwiths

@userwiths In case you missed this comment.

glassez avatar Jun 05 '25 06:06 glassez

Soooo we keep using * in removeTrackersAction but use all in addTrackersAction ? Because removeTrackersAction used * since before and addTrackersAction is the new one i guess.

Ok changes coming in minute.

userwiths avatar Jun 05 '25 06:06 userwiths

https://github.com/qbittorrent/qBittorrent/blob/e903c560915f083c66663975370340838e5ae837/src/webui/api/torrentscontroller.cpp#L1005-L1009 That should be what you requested, we only pass all to applyToTorrents and never *.

Also rebased because I saw there was a conflict with master.

userwiths avatar Jun 05 '25 07:06 userwiths

That should be what you requested, we only pass all to applyToTorrents and never *.

Changes made to applyToTorrents() should also be reverted.

glassez avatar Jun 05 '25 07:06 glassez

@userwiths Thank you!

Chocobo1 avatar Jun 28 '25 06:06 Chocobo1