Linux settings not use first time after set it ...
#1
Hi,
This is a move of an existing topic not put (by me) in the good forum ...

I have write a program launcher plugin (in python) adapted to a NAS environment ...
to be able to start Chrome (with URL or not, in App mode or not), firefox, any NAS HDMI interface application from Kodi ... with the specific structure of the NAS ...

All seems to work as expected (configure, run, edit, delete, etc.) with only one problem
I have some settings (boolean) ... when I change this settings (right click on addon icon or from addon menu), the setting is change (when I read the settings.xml in the addon_data of the user) ... but
If I start (execute) the addon the changed settings is not used (I have a dialog to confirm action require) ... but if I stop it and restart it ... changed settings is apply and use ...

I have not discover a sort of refresh in addon Python interface ... so I don't know why ...

Do you have any idea ... or advice to search ...

Addons is write in Python, run as well (except the small difficulty) under Kodi 17.1

Philippe.
Reply
#2
Hi,
F.Y.I.
I have not understand, but I have use a workaround ...
previously I get Setting (addon.getSetting) just after import and some basic verification (folder creation if not exist, etc.) in my Python code

... seems that this part of the code is not execute (after closing addon) when I start it again ... I go directly to the create / display of the directory (addDir, addSiteDir, etc.)

So I have add to get again the settings in this phase and not only at initial phase
seems that this solve the problem ... settings are read and use during the Directory creation / display

It's a workaround, this don't explain why starting first after set settings ... don't work, but stop and start gain ... works Huh

Not important but clearly something is out of my understanding ...

Philippe.
Reply

Logout Mark Read Team Forum Stats Members Help
settings not use first time after set it ...0