Solved Get Kodi/XBMC main setting
#1
Hi,

in my addon I would like get a couple of XBMC settings.
In my case, I would like have the Device name (stored in Settings/Services/General).

Another (unrelated) question: Where can I "navigate" in the others addons source (like github) for some "inspiration"?

I know there is ssh://[email protected]/p/xbmc/scripts, but I have to clone for see the code.

Another one question (is the last for sure!) : Can I set an "helper string" for a setting, like xbmc main settings?

I have a lot of questions, sorry Wink

thanks,
Muttley
Reply
#2
When you install an addon, the source code is all there in your addons folder.
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Hi nickr, I think that my english is too bad, there is a misunderstanding or I don't understand your answer.

My questions are:
- How my addon can get Device name (stored in Settings/Services/General)
- Where can I navigate in source code of others addons (look like github), but in your official repository.
- In the latest Xbmc release, at the bottom of the main setting, there is an user "helper string". Can I do the same in my addon settings?

thanks in advance and sorry for my poor english.

Ciao,
Muttley
Reply
#4
1) Dont know.

2) Install the addon. The source code is readable in the addon folder. Install all the addons you want to look at, then use grep to search within them.

3) No, I dont think you can use the helper string in your own addon.
Reply
#5
1. Shit
2. Yeah, I know. At this point, I think it's better do a git clone of ssh://[email protected]/p/xbmc/scripts. Or select source in http://addons.xbmc.org/ Smile
3. Shit (again)

Thanks Karnagious for your answer, It's really appreciated

p.s. I have post a request for this features: http://forum.xbmc.org/showthread.php?tid=204756
Reply
#6
1) you can read (and write) any setting via JSONrpc. Documentation for this is missing on Wiki, but if you use http://wiki.xbmc.org/index.php?title=JSO...Introspect you'll get the documentation for the desired functions

2) see paragraph 1.1 Official_add-on_repository (wiki)

3), this is not yet possible, because the addons settings system hasn't been migrated to the new settings system in Kodi yet. But plan is to migrate and after that it would be possible AFAIK
Reply
#7
You are my hero!

1. I'll study it Smile

2. Ok, I would prefer a web navigable interface (like github but for all the addon-on), but it's ok!

3. Perfect! I'll waiting for this new features.

Thanks a lot!
Reply
#8
for 2) you can browse the SF repository from their website as well
http://sourceforge.net/p/xbmc/_list/git

click on the repo name and after that select the according branch (Gotham or Helix most likely)
Reply
#9
waoooo...great! It's what I needed!

I think can be useful add it on wiki page: http://wiki.xbmc.org/index.php?title=Off...repository

like "All current add-ons can be downloaded as ZIP files from the repository server or they are navigable through http://sourceforge.net/p/xbmc/_list/git.

but in a more correct english Big Grin
Reply
#10
at the end this is the solution for question 1:
Quote:response = xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "params": {"setting": "services.devicename" }, "id": 1 }')
print json.loads(response)['result']['value']

or with curl:
Quote:curl --data-binary '{ "jsonrpc": "2.0", "method": "Settings.GetSettingValue", "params": {"setting": "services.devicename" }, "id": 1 }' -H 'content-type: application/json;' -u xbmc:xbmc http://localhost:8080/jsonrpc

thanks again
Reply

Logout Mark Read Team Forum Stats Members Help
Get Kodi/XBMC main setting0