Kodi Community Forum

Full Version: How to update addon settings with a backend value
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Is there a way to update a value in AddonSettings programatically?

I have two backend values which are read from the STB and would like to display them in the addons settings so they could be changed. However I can't see if this is possible.

The other option would be modify settings.xml itself, but that's a bit messy.

Thanks in advance
Yes you can set a setting by calling kodi::SetSetting(Boolean|Float|Int|String), see https://codedocs.xyz/xbmc/xbmc/namespace...0e9b332fc5.
(2018-11-03, 21:10)Rechi Wrote: [ -> ]Yes you can set a setting by calling kodi::SetSetting(Boolean|Float|Int|String), see https://codedocs.xyz/xbmc/xbmc/namespace...0e9b332fc5.
 Thanks @Rechi . I get a linker error why I try to call it. I wonder do the PVR addons support these yet. Or maybe I'm missing an include I don't know about.
Also, if the above method worked would
that be for general Kodi settings or specifically for addon settings?
You are right that's only available for the new C++ interface which PVR isn't migrated to yet.

The methods are for the specific addon.
Hack it is so Wink Unless there is a better suggestion.

Is there any method of making settings.xml reload?

Otherwise it’s wait until the next time Kodi restarts.