Page 1 of 1

How to add/remove trackers from command line interface (CLI)?

Posted: Thu Sep 17, 2015 5:04 pm
by snakyjake
How can I remove trackers from the command line (CLI)?

How can I add trackers from the command line (CLI)?

Re: How to add/remove trackers from command line interface (CLI)?

Posted: Fri Sep 18, 2015 7:37 pm
by ciaobaby
You can't.

And the WEB API does not support removing trackers either only adding them.

https://github.com/qbittorrent/qBittorr ... to-torrent

Re: How to add/remove trackers from command line interface (CLI)?

Posted: Wed Sep 14, 2016 8:07 am
by whitebear
I am struggling the same problem.
My work around idea is delete the files directory under

$HOME/.local/share/data/qBittorrent/BT_backup/

There is a pair of files like

***.torrent
***.fastresume

according to a tracker.

If I can find out the way to get the ***.torrent name from tracker name shown on webUI.

Is there any good solution??

Re: How to add/remove trackers from command line interface (CLI)?

Posted: Thu Sep 15, 2016 7:05 am
by KitKat
[quote="whitebear"]
There is a pair of files like
***.torrent
***.fastresume
If I can find out the way to get the ***.torrent name from tracker name shown on webUI.
[/quote]
Image


That %I will pass the torrent hash (the *** bit in ***.torrent) to your script.
You can then do whatever with it, found under options > downloads > scroll down.

I dont recommend deleting those files while the client is running though, it probably wont work as intended.
The .torrent file is a backup/copy of the initial torrent in the client, the .fastresume file tells the client to resume from this point.
Deleting them will just remove the torrent from the client not remove trackers.. (at least when its closed i dont know how it functions when performed while the client is running..)

If you just want to delete the torrent file but have it remain in the client when it completes theres a checkbox for that..
http://i.imgur.com/u2BgPOq.png

Re: How to add/remove trackers from command line interface (CLI)?

Posted: Wed Sep 28, 2016 11:56 pm
by bobbintb
I may be wrong but I think this is a limitation of libtorrent library that is the core of qbittorrent. I recall reading somewhere that rutorrent (the web interface for rtorrent) has the same technical limitation but gets around it by effectively removing all the tracker and then adding them back, minus the one you want removed. If you really want to do this then the only way I can think of is to right a custom script and use the web API. You would have to know the torrent hash and use that as an argument as well as the tracker you want to remove. Then the script would use curl to use the API to get a list of trackers associated with that torrent. Then the script would parse them out in an array, remove the one you don't want from the array, then use the API again to delete all the trackers and add them back from the array (which now has the desired tracker removed). Not very user friendly but likely your only option for the moment. I would also suggest checking for a similar feature request and adding it if it doesn't already exist.