Problems with method: core.get_torrents_status

General support for problems installing or using Deluge
Post Reply
Valeal
New User
New User
Posts: 2
Joined: Fri Dec 17, 2021 12:08 pm

Problems with method: core.get_torrents_status

Post 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?
mhertz
Moderator
Moderator
Posts: 2215
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Problems with method: core.get_torrents_status

Post 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?
Valeal
New User
New User
Posts: 2
Joined: Fri Dec 17, 2021 12:08 pm

Re: Problems with method: core.get_torrents_status

Post by Valeal »

deluge: 1.3.15
libtorrent: 1.0.11.0
Post Reply