v19 Settings Migration - Enum Type
#1
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:
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>
Reply
#2
Playing with this a bit more it seems the "label" attribute has to take a string ID. Makes sense in terms of translations for strings but if anyone could confirm this is expected behavior that would be great.
Reply
#3
Yes I got that confirmation here https://forum.kodi.tv/showthread.php?tid...pid2934863

Martin
Reply
#4
(2020-12-04, 20:47)emveepee Wrote: Yes I got that confirmation here https://forum.kodi.tv/showthread.php?tid...pid2934863

Martin

Great - Thanks!
Reply

Logout Mark Read Team Forum Stats Members Help
Settings Migration - Enum Type0