script to change addon settings - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26) +--- Thread: script to change addon settings (/showthread.php?tid=356948) |
script to change addon settings - james739 - 2020-09-08 I'm trying to change addon settings with a script that will be called when button is pressed. Unfortunately its not working. Can someone give a hand Code: import xbmc I want to change the infodialog_onclick from extended.info settings Code: <setting label="32163" type="bool" id="infodialog_onclick" default="true"/> RE: script to change addon settings - ronie - 2020-09-08 the json-rpc interface can only access Kodi settings. you need to use this python function for addon settings: https://codedocs.xyz/xbmc/xbmc/group__python__xbmcaddon.html#gaa9a6e6f699f811533dde9865de44dac1 RE: script to change addon settings - james739 - 2020-09-08 (2020-09-08, 02:13)ronie Wrote: the json-rpc interface can only access Kodi settings. Hello, I tried Code: xbmc.executebuiltin('xbmcaddon.Addon([script.extendedinfo]).setSettingBool(infodialog_onclick, false)') Doesn't work. What's wrong? RE: script to change addon settings - ronie - 2020-09-08 it's a python function, not a kodi builtin. you do not need to wrap it in a executebuiltin() call. regarding our python docs, a param in brackets [] indicates it's optional, the brackets itself are not part of the actual function.
RE: script to change addon settings - james739 - 2020-09-09 (2020-09-08, 18:21)ronie Wrote:This worked thank you! I'm learning Code: xbmcaddon.Addon('script.extendedinfo').setSettingBool('infodialog_onclick', 'false') |