Is it possible to dynamically set list of items in Addon settings from python?
#1
Hello,

I would like to define a list of items for my Addon settings page for the user to choose from. This list has to be created dynamically based on some parameters on the individual system.

So far I've only found documentation for the XML-based settings page which does not have any callbacks into my Python code. Is it possible to create parts of the settings page with Python and if yes: How?
Reply
#2
Not possible now
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
#3
So the only way would be to let the user manually enter the text in text boxes... Not the nicest way to do it, but it will work...
Reply
#4
Maybe a silly idea, but would it be possible to dynamically write the "settings.xml" file?

The one in the Addon directory itself can't always be written, but is it possible to place a copy to the user profile? Where would I have to place my copy so Kodi uses it even if the Addon itself is installed to /usr/share/kodi/addons/ ?
Is it possible to place only this one resource file to the user profile and Kodi still reads all the other resource files from the global path?

When does Kodi actually read the settings.xml file? Do I have a Python callback which is always running before Kodi first reads settings.xml?
Reply
#5
No you can't put the settings.xml file somewhere else. Yes we would like to have a more dynamic settings as well but it's just not done yet.
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
#6
(2016-09-22, 08:04)M-Reimer Wrote: When does Kodi actually read the settings.xml file?

When it opens the relevant add-on settings page.
Learning Linux the hard way !!
Reply

Logout Mark Read Team Forum Stats Members Help
Is it possible to dynamically set list of items in Addon settings from python?0