v18 Settings set with setSetting() don't appear to be saved
#1
In my addon, I have to save a username and password for a external service. To do this, I read about xbmcaddon.Addon().setSetting(). I attempted to use this, but it didn't appear to save. Additionally no folder for my plugin was created in the userdata > addon_data folder. When I debug with getSetting() it returns a blank output.

For reference, here is the code I'm using:
python:

addon = xbmcaddon.Addon()
addon.setSetting('password', str(password))
addon.getSetting('password')

Am I doing something wrong? Any help would be appreciated.
Reply
#2
In Leia addon settings system has been reworked, and it seems that you can no longer store settings that do not have their corresponding widgets in settings.xml.
Reply
#3
That sounds like a bug that needs to be fixed imo
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#4
if you want to use the addon settings system, you need to ship a settings.xml file with your addon.

a dummy file like this should be good enough:
xml:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings></settings>

this is not related to the recent settings changes, it's always worked like that ;-)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
(2017-11-22, 00:26)ronie Wrote: if you want to use the addon settings system, you need to ship a settings.xml file with your addon.

a dummy file like this should be good enough:
xml:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings></settings>

this is not related to the recent settings changes, it's always worked like that ;-)
Sure enough, it works now. Thanks a heap!
Reply
#6
Sounds a bit silly that we need to ship an empty file cause by using the API it's incapable of creating it Smile
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply

Logout Mark Read Team Forum Stats Members Help
Settings set with setSetting() don't appear to be saved0