Page 1 of 1

Problems with method: core.get_torrents_status

Posted: Fri Dec 17, 2021 12:24 pm
by Valeal
I will try to get information about current torrent files in deluge.
I will use Web API this way as was provided here - viewtopic.php?f=7&t=39791&p=167603&hili ... on#p167603:

Code: Select all

curl -H 'Accept: application/json' -H 'Content-Type: application/json' -c 'cookies.txt' --data '{"id": 1, "method": "auth.login", "params": ["deluge"]}' http://localhost:8112/json

curl -H 'Accept: application/json' -H 'Content-Type: application/json' -b 'cookies.txt' --data '{"id": 2, "method": "web.get_hosts", "params": []}' http://localhost:8112/json

curl -H 'Accept: application/json' -H 'Content-Type: application/json' -b 'cookies.txt' --data '{"id": 2, "method": "web.get_host_status", "params": ["a939b8bd39404384a0f15a664bbdf55c"]}' http://localhost:8112/json

curl -H 'Accept: application/json' -H 'Content-Type: application/json' -b 'cookies.txt' --data '{"id": 2, "method": "web.connect", "params": ["a939b8bd39404384a0f15a664bbdf55c"]}' http://localhost:8112/json

curl -H 'Accept: application/json' -H 'Content-Type: application/json' -b 'cookies.txt' --data '{"id": 2, "method": "core.get_torrents_status", "params": [{},["name", "progress"]]}' http://localhost:8112/json
There are no errors in previous commands. Anyway,I have this result after executing the last command:

Code: Select all

{"result": {}, "error": null, "id": 2}
I have torrents files in deluged, but cannot get it via API.
What am I doing wrong?

Re: Problems with method: core.get_torrents_status

Posted: Wed Dec 22, 2021 8:18 pm
by mhertz
I just tested this in latest deluge under linux, and the call seemingly works fine, atleast for me, and your last line outputs here:

Code: Select all

martin@arch ~/Downloads % bash deluge-web-test 
{"result": true, "error": null, "id": 1}{"result": {"85bbba4035cca750f681284857f53e405eb41f7d": {"name": "archlinux-2021.02.01-x86_64.iso", "progress": 100.0}}, "error": null, "id": 2}%                                                                                           
Sorry don't know what's wrong on your end unfortunetly. What version btw?

Re: Problems with method: core.get_torrents_status

Posted: Sat Dec 25, 2021 6:27 pm
by Valeal
deluge: 1.3.15
libtorrent: 1.0.11.0