API: issue with set_config & server settings
Posted: October 11th, 2011, 8:19 pm
hi.
1st & foremost: thanks a lot for this great app!
now, straight to the issue:
using API, I manage to use mode=set_config to change settings in sabnzbd.ini
everything works except, when I want to change a server setting (like 'connections'), due to the fact that each server is a SUB-section of [servers] & mode=set_config doesn't seem to be able to "reach" SUB-sections (just regular sections).
by the way and for the record, I am using v0.6.9 (win32) on win7 x64.
the sabnzbd.ini created by sabnzbd is as follow:
here are the things I tried:
- try #1:this one creates a "blank" server and thus returns:
- try #2:
does the very same as get config, but syntax reaches its limit: i cannot specify another "keyword=connections"
- try #3:"error: Config item does not exist"
- try #4:"error: Config item does not exist"
any undocumented workaround?
thanks a lot for any help (by the way, I am writing an app/script to "pool" my connections through a web server and dispatch those connections as required among computers on my network).
1st & foremost: thanks a lot for this great app!
now, straight to the issue:
using API, I manage to use mode=set_config to change settings in sabnzbd.ini
everything works except, when I want to change a server setting (like 'connections'), due to the fact that each server is a SUB-section of [servers] & mode=set_config doesn't seem to be able to "reach" SUB-sections (just regular sections).
by the way and for the record, I am using v0.6.9 (win32) on win7 x64.
the sabnzbd.ini created by sabnzbd is as follow:
Code: Select all
[servers]
[[secure.usenetserver.com]]
username = xxxxxxx
enable = 1
name = secure.usenetserver.com
fillserver = 0
connections = 10
ssl = 1
host = secure.usenetserver.com
............
- try #1:
Code: Select all
http://localhost:8080/sabnzbd/api?apikey=xxxxxxxxxxxxxxxxxxxxx&mode=set_config§ion=servers&keyword=connections&value=20
Code: Select all
{'servers': [{'username': '', 'enable': 1, 'name': 'connections', 'fillserver': 0, 'connections': 1, 'ssl': 0, 'host': '', 'timeout': 120, 'password': '', 'optional': 0, 'port': 119, 'retention': 0}]}Code: Select all
http://localhost:8080/sabnzbd/api?apikey=xxxxxxxxxxxxxxxxxxxxx&mode=set_config§ion=servers&keyword=secure.usenetserver.com
- try #3:
Code: Select all
http://localhost:8080/sabnzbd/api?apikey=xxxxxxxxxxxxxxxxxxxxx&mode=set_config§ion=[secure.usenetserver.com]&keyword=connections&value=20- try #4:
Code: Select all
http://localhost:8080/sabnzbd/api?apikey=xxxxxxxxxxxxxxxxxxxxx&mode=set_config§ion=secure.usenetserver.com&keyword=connections&value=20any undocumented workaround?
thanks a lot for any help (by the way, I am writing an app/script to "pool" my connections through a web server and dispatch those connections as required among computers on my network).