Page 1 of 1

JSON RPC Set Config

Posted: Mon Apr 30, 2012 6:20 pm
by gprime
I am attempting to set a value in the overall config of deluge. But each time I try to set it it just hangs there.

This is what I am calling after a successful login:

Code: Select all

curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"","method":"core.set_config","params":{"max_upload_slots_global":"200"}}' http://localhost:8112/json
Also, if I want to set the configs values on startup, how to I know the names of the values to set. I can't find any examples or docs that help me out with this. I can pass into the terminal --config=pathtoconfig but how should the file containing the config values be organize?

Re: JSON RPC Set Config

Posted: Tue May 01, 2012 10:20 am
by Cas
gprime wrote:I am attempting to set a value in the overall config of deluge. But each time I try to set it it just hangs there.
Note the extra square brackets used in params around the dict:

Code: Select all

curl -b cookies.txt --compressed -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"id":"","method":"core.set_config","params":[{"max_upload_slots_global":"200"}]}' http://localhost:8112/json
gprime wrote:Also, if I want to set the configs values on startup, how to I know the names of the values to set. I can't find any examples or docs that help me out with this. I can pass into the terminal --config=pathtoconfig but how should the file containing the config values be organize?
Not sure what you trying to achieve but you can use core.get_config() for a list of all keys or look in the preferencesmanager for the majority.