docs on json rpc namespace
#1
Hi all,

I'd need help with Kodi json Settings namespace methods - I can't find any docs... for settings.

specifically, are the settings from advancedsettings.xml included in Settings.GetSettingValue namespace/method?

i.e. i can do something like

Code:
{"jsonrpc": "2.0",  "id": 1, "method": Settings.GetSettingValue", "params": { "setting": "subtitles.custompath" }  }

for setting in guisettings, but is it possible to get settings from advancedsettings similary?

And where can I find it documented? I looked at the wiki and all other namespaces are documented more or less, but I can't seem to find anything on settings?

Thanx!
Reply
#2
You can get all methods on github.

Settings are at the bottom.

Do a:
JSON_req = {"jsonrpc": "2.0", "method": "JSONRPC.Introspect", "params": { "filter": { "id": "Settings.GetCategories", "type": "method" } }, "id": 1 }

to get to know all settings.

retrieve the correct setting with eg::

JSON_req = {"jsonrpc": "2.0",
"method": "Settings.GetSettingValue",
"params": {"setting": "locale.audiolanguage"},
"id": 1}
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#3
Sorry, a bit to quick.

For advancedsettings I just do:

Code:
try:
            tree_XML = ET.parse(xbmc.translatePath("special://masterprofile/advancedsettings.xml"))
            advancedsettings_XML = tree_XML.getroot()
            log('advancedsettings.xml file has been read.')
            # Get all values          
            Temp = advancedsettings_XML.find("video/playcountminimumpercent")
            if Temp is not None:
                Global_BIU_vars["playcountminimumpercent"] = int(Temp.text)
            Temp = advancedsettings_XML.find("video/ignoresecondsatstart")
            if Temp is not None:
                Global_BIU_vars["ignoresecondsatstart"] = int(Temp.text)
            Temp = advancedsettings_XML.find("video/ignorepercentatend")
            if Temp is not None:
                Global_BIU_vars["ignorepercentatend"] = int(Temp.text)
        except Exception:
            log('Error reading advancedsettings.xml!!')
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#4
Thanx for the reply. That is exactly what I do now - parse XML with minidom... I thought direct reading/writing of xml was forbidden, but seems advancedsettings is not implemented?
Reply
#5
I only read from advancedsettings.

Advancedsettings is also a mistery for me. No addon is accepted that would make those settings easely available (through the GUI) to the user.

Yet some settings have value.

I would also like to know the official point of view about reading and writing to advancedsettings.xml
Add-on : Bluray iso utils Rewrite of BR_iso_enhancements
Add-on : BR_iso_Enhancements Give theatrical & directors cut from the same bluray iso each their own library entry, use bluray iso's of tv shows as if they are already ripped.
Reply
#6
Well, there doesn't seem to be other way than to parse XML... Smile
Reply

Logout Mark Read Team Forum Stats Members Help
docs on json rpc namespace0