How to update addon settings with a backend value
#1
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
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#2
Yes you can set a setting by calling kodi::SetSetting(Boolean|Float|Int|String), see https://codedocs.xyz/xbmc/xbmc/namespace...0e9b332fc5.
Reply
#3
(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.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#4
Also, if the above method worked would
that be for general Kodi settings or specifically for addon settings?
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#5
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.
Reply
#6
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.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply

Logout Mark Read Team Forum Stats Members Help
How to update addon settings with a backend value0