Hi,
I would like to know the best way to stop or resume all torrents?
Is there an instruction?
Thanks
Web API Controls
Re: Web API Controls
In 1.3 there is
core.pause_all_torrents
and core.resume_all_torrents
. Note this pauses the session rather than the status of individual torrents. If you need the latter then core.pause_torrent
or core.resume_torrent
with the list of all torrents.-
- Leecher
- Posts: 56
- Joined: Sun Oct 04, 2015 6:11 pm
Re: Web API Controls
Thanks Cas!
I have tested this:
But it's loading an endless json response.
Thoughts?
I have tested this:
Code: Select all
#!/bin/bash
sudo curl -c cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"method": "auth.login", "params": ["password"], "id": 1}' http://192.168.1.104:8112/json
json=$(sudo curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"method": "core.pause_torrent", "params": [["32711a056af4df3454302857784f92a7e351b375","33fdcbebc3a58fc9e4f24511667149391d30aaf2"], {}], "id": 1}' http://192.168.1.104:8112/json)
sudo rm cookies.txt
echo $json
Thoughts?
Re: Web API Controls
You have included an unneeded empty dict in params
-
- Leecher
- Posts: 56
- Joined: Sun Oct 04, 2015 6:11 pm
Re: Web API Controls
Same result with
Code: Select all
#!/bin/bash
sudo curl -c cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"method": "auth.login", "params": ["password"], "id": 1}' http://192.168.1.104:8112/json
json=$(sudo curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"method": "core.pause_torrent", "params": ["32711a056af4df3454302857784f92a7e351b375", "315b7ef02d2001c1dd8ac963fb977d8c6ae4941f"], "id": 1}' http://192.168.1.104:8112/json)
sudo rm cookies.txt
echo $json
Re: Web API Controls
You have taken away the list too! It's a params list containing a torrents list
-
- Leecher
- Posts: 56
- Joined: Sun Oct 04, 2015 6:11 pm
Re: Web API Controls
Ok got it!
Is there a method to refresh all torrents trackers also?
Thanks!
Is there a method to refresh all torrents trackers also?
Thanks!