Concurrent modification of settings.xml issues
For a screen-reader plugin you can choose the speech engine, the language, voice, etc. The settings.xml uses ACTION controls to get the addon
to present selection dialogs and do the actual setSetting(). This works okay, except that the addon does not see the changed setting values. Specifically, if the addon does an addon.setSetting, followed by an addon.getSetting for the same setting, the get will not return the value set. You have to exit the setting gui and reopen before the new values appear. It doesn't help to call xbmcaddon.Addon().getSetting(). I assume getSetting is reading the value from the settings.xml file, which is not written to until AFTER the settings gui closes.

Below is a snippet from the settings.xml for selecting the language. A similar method will be used to set the voice.

<setting help="" id="language.ResponsiveVoice" label="32016" parent="backend" type="string">
<control type="button" format="action">
<control format="action" type="button"/>
To choose the voice, the addon needs to be able to  query the language value that the addon just set above, but so far I'm out of luck. Here is the code used to query the value immediately after setting in:

I could stash the value in the addon, but this is not very appealing. It seems this is a bug in the settings code.

Messages In This Thread
Concurrent modification of settings.xml issues - by fbacher - 2020-06-10, 19:40

Logout Mark Read Team Forum Stats Members Help
Concurrent modification of settings.xml issues0
This forum uses Lukasz Tkacz MyBB addons.