2020-12-04, 17:19
I'm playing around with migrating settings on my Matrix compatible addons to the new settings xml format detailed here: https://kodi.wiki/view/Add-on_settings_conversion
I'm having trouble with what was previously the "enum" format. What I want displayed is a spinner with the labels "1 minute|2 minute", etc with the return value being an integer in the addon. I followed the examples on the wiki but no matter what I put in for the "label" attribute the strings I see in the UI are "Pictures, Settings, TV Guide" and others. I'm guessing these are the integer values for these strings being translated. Is this a bug or am I doing something wrong? Below is the code I'm using for this:
I'm having trouble with what was previously the "enum" format. What I want displayed is a spinner with the labels "1 minute|2 minute", etc with the return value being an integer in the addon. I followed the examples on the wiki but no matter what I put in for the "label" attribute the strings I see in the UI are "Pictures, Settings, TV Guide" and others. I'm guessing these are the integer values for these strings being translated. Is this a bug or am I doing something wrong? Below is the code I'm using for this:
Code:
<setting id="startup_delay" type="integer" label="30008" help="">
<level>0</level>
<default>0</default>
<constraints>
<options>
<option label="No Delay">0</option>
<option label="1 minute">1</option>
<option label="2 minutes">2</option>
<option label="3 minutes">3</option>
<option label="4 minutes">4</option>
<option label="5 minutes">5</option>
</options>
</constraints>
<control type="spinner" format="string" />
</setting>