Setting types
type="text"
<setting type="text" id="test01" label="32001" default=""/>
New Setting Format
|
<setting id="test01" type="string" label="32001" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="edit" format="string">
<heading>32001</heading>
</control>
</setting>
|
<setting type="text" id="test02" label="32002" default="" option="hidden"/>
New Setting Format
|
<setting id="test02" type="string" label="32002" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="edit" format="string">
<heading>32002</heading>
<hidden>true</hidden>
</control>
</setting>
|
<setting type="text" id="test03" label="32003" default="" option="urlencoded"/>
New Setting Format
|
<setting id="test03" type="urlencodedstring" label="32003" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="edit" format="urlencoded">
<heading>32003</heading>
</control>
</setting>
|
type="ipaddress"
<setting type="ipaddress" id="test04" label="32004"/>
New Setting Format
|
<setting id="test04" type="string" label="32004" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="edit" format="ip">
<heading>32004</heading>
</control>
</setting>
|
type="number"
<setting type="number" id="test05" label="32005"/>
New Setting Format
|
<setting id="test05" type="integer" label="32005" help="">
<level>0</level>
<default>0</default>
<control type="edit" format="integer">
<heading>32005</heading>
</control>
</setting>
|
type="date"
<setting type="date" id="test06" label="32006" default="2015-03-12"/>
New Setting Format
|
<setting id="test06" type="date" label="32006" help="">
<level>0</level>
<default>2015-03-12</default>
<control type="button" format="date">
<heading>32006</heading>
</control>
</setting>
|
type="time"
<setting type="time" id="test07" label="32007" default="13:13"/>
New Setting Format
|
<setting id="test07" type="time" label="32007" help="">
<level>0</level>
<default>13:13</default>
<control type="button" format="time">
<heading>32007</heading>
</control>
</setting>
|
type="bool"
<setting type="bool" id="test08" label="32008" default="false"/>
New Setting Format
|
<setting id="test08" type="boolean" label="32008" help="">
<level>0</level>
<default>false</default>
<control type="toggle"/>
</setting>
|
type="select"
<setting type="select" id="test09" label="32009" lvalues="11|12|13|14"/>
New Setting Format
|
<setting id="test09" type="integer" label="32009" help="">
<level>0</level>
<default>0</default>
<constraints>
<options>
<option label="11">0</option>
<option label="12">1</option>
<option label="13">2</option>
<option label="14">3</option>
</options>
</constraints>
<control type="list" format="string">
<heading>32009</heading>
</control>
</setting>
|
<setting type="select" id="test10" label="32010" values="aa|bb|cc|dd"/>
New Setting Format
|
<setting id="test10" type="string" label="32010" help="">
<level>0</level>
<default/>
<constraints>
<options>
<option>aa</option>
<option>bb</option>
<option>cc</option>
<option>dd</option>
</options>
<allowempty>true</allowempty>
</constraints>
<control type="list" format="string">
<heading>32010</heading>
</control>
</setting>
|
type="addon"
<setting type="addon" id="test11" label="32011" default="" addontype="xbmc.metadata.scraper.movies"/>
New Setting Format
|
<setting id="test11" type="addon" label="32011" help="">
<level>0</level>
<default/>
<constraints>
<addontype>xbmc.metadata.scraper.movies</addontype>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="addon">
<heading>32011</heading>
<show more="true" details="true">installed</show>
</control>
</setting>
|
<setting type="addon" id="test12" label="32012" default="" addontype="xbmc.metadata.scraper.movies" multiselect="true"/>
New Setting Format
|
<setting id="test12" type="list[addon]" label="32012" help="">
<level>0</level>
<default/>
<constraints>
<addontype>xbmc.metadata.scraper.movies</addontype>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="addon">
<heading>32012</heading>
<show more="true" details="true">installed</show>
<multiselect>true</multiselect>
</control>
</setting>
|
type="enum"
<setting type="enum" id="test13" label="32013" lvalues="11|12|13|14"/>
New Setting Format
|
<setting id="test13" type="integer" label="32013" help="">
<level>0</level>
<default>0</default>
<constraints>
<options>
<option label="11">0</option>
<option label="12">1</option>
<option label="13">2</option>
<option label="14">3</option>
</options>
</constraints>
<control type="spinner" format="string"/>
</setting>
|
<setting type="enum" id="test14" label="32014" values="aa|bb|cc|dd"/>
New Setting Format
|
<setting id="test14" type="integer" label="32014" help="">
<level>0</level>
<default>0</default>
<constraints>
<options>
<option label="aa">0</option>
<option label="bb">1</option>
<option label="cc">2</option>
<option label="dd">3</option>
</options>
</constraints>
<control type="spinner" format="string"/>
</setting>
|
type="labelenum"
in case you use lvalues in a labelenum control, the saved value will now be the string id, instead of the localized string.
please adapt your python code for this.
<setting type="labelenum" id="test15" label="32015" lvalues="11|12|13|14"/>
New Setting Format
|
<setting id="test15" type="string" label="32015" help="">
<level>0</level>
<default/>
<constraints>
<options>
<option label="11">11</option>
<option label="12">12</option>
<option label="13">13</option>
<option label="14">14</option>
</options>
<allowempty>true</allowempty>
</constraints>
<control type="spinner" format="string"/>
</setting>
|
<setting type="labelenum" id="test16" label="32016" values="bb|aa|dd|cc" sort="yes"/>
New Setting Format
|
<setting id="test16" type="string" label="32016" help="">
<level>0</level>
<default/>
<constraints>
<options sort="ascending">
<option label="bb">bb</option>
<option label="aa">aa</option>
<option label="dd">dd</option>
<option label="cc">cc</option>
</options>
<allowempty>true</allowempty>
</constraints>
<control type="spinner" format="string"/>
</setting>
|
note: for labelenum settings, the label attribute for the options is optional.
if you use it, it can either be a hardcoded string (label="foobar") or a localized id (label="32085").
type="slider"
<setting type="slider" id="test17" label="32017" default="20" range="5,5,100" option="int"/>
New Setting Format
|
<setting id="test17" type="integer" label="32017" help="">
<level>0</level>
<default>20</default>
<constraints>
<minimum>5</minimum>
<step>5</step>
<maximum>100</maximum>
</constraints>
<control type="slider" format="integer">
<popup>false</popup>
</control>
</setting>
|
<setting type="slider" id="test18" label="32018" default="0.5" range="0.0,0.1,1.0" option="float"/>
New Setting Format
|
<setting id="test18" type="number" label="32018" help="">
<level>0</level>
<default>0.5</default>
<constraints>
<minimum>0.0</minimum>
<step>0.1</step>
<maximum>1.0</maximum>
</constraints>
<control type="slider" format="number">
<popup>false</popup>
</control>
</setting>
|
<setting type="slider" id="test19" label="32019" default="20" range="0,1,100" option="percent"/>
New Setting Format
|
<setting id="test19" type="integer" label="32019" help="">
<level>0</level>
<default>20</default>
<constraints>
<minimum>0</minimum>
<step>1</step>
<maximum>100</maximum>
</constraints>
<control type="slider" format="percentage">
<popup>false</popup>
</control>
</setting>
|
type="file"
<setting type="file" id="test20" label="32020" default=""/>
New Setting Format
|
<setting id="test20" type="path" label="32020" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="file">
<heading>32020</heading>
</control>
</setting>
|
type="audio"
<setting type="audio" id="test21" label="32021" default=""/>
New Setting Format
|
<setting id="test21" type="path" label="32021" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<masking>audio</masking>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="file">
<heading>32021</heading>
</control>
</setting>
|
type="video"
<setting type="video" id="test22" label="32022" default=""/>
New Setting Format
|
<setting id="test22" type="path" label="32022" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<masking>video</masking>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="file">
<heading>32022</heading>
</control>
</setting>
|
type="image"
<setting type="image" id="test23" label="32023" default=""/>
New Setting Format
|
<setting id="test23" type="path" label="32023" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<masking>image</masking>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="image">
<heading>32023</heading>
</control>
</setting>
|
type="executable"
<setting type="executable" id="test24" label="32024" default=""/>
New Setting Format
|
<setting id="test24" type="path" label="32024" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<masking>executable</masking>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="file">
<heading>32024</heading>
</control>
</setting>
|
type="folder"
<setting type="folder" id="test25" label="32025" default=""/>
New Setting Format
|
<setting id="test25" type="path" label="32025" help="">
<level>0</level>
<default/>
<constraints>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32025</heading>
</control>
</setting>
|
<setting type="folder" id="test26" label="32026" default="" option="writeable"/>
New Setting Format
|
<setting id="test26" type="path" label="32026" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32026</heading>
</control>
</setting>
|
<setting type="folder" id="test27" label="32027" default="" source="videos"/>
New Setting Format
|
<setting id="test27" type="path" label="32027" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>videos</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32027</heading>
</control>
</setting>
|
<setting type="folder" id="test28" label="32028" default="" source="music"/>
New Setting Format
|
<setting id="test28" type="path" label="32028" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>music</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32028</heading>
</control>
</setting>
|
<setting type="folder" id="test29" label="32029" default="" source="pictures"/>
New Setting Format
|
<setting id="test29" type="path" label="32029" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>pictures</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32029</heading>
</control>
</setting>
|
<setting type="folder" id="test30" label="32030" default="" source="programs"/>
New Setting Format
|
<setting id="test30" type="path" label="32030" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>programs</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32030</heading>
</control>
</setting>
|
<setting type="folder" id="test31" label="32031" default="" source="files"/>
New Setting Format
|
<setting id="test31" type="path" label="32031" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>files</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32031</heading>
</control>
</setting>
|
<setting type="folder" id="test32" label="32032" default="" source="local"/>
New Setting Format
|
<setting id="test32" type="path" label="32032" help="">
<level>0</level>
<default/>
<constraints>
<sources>
<source>local</source>
</sources>
<writable>false</writable>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="path">
<heading>32032</heading>
</control>
</setting>
|
type="action"
<setting type="action" id="test33" label="32033" action="RunScript(script.globalsearch)" option="close"/>
New Setting Format
|
<setting id="test33" type="action" label="32033" help="">
<level>0</level>
<data>RunScript(script.globalsearch)</data>
<control type="button" format="action">
<close>true</close>
</control>
</setting>
|
<setting type="action" id="test34" label="32034" action="RunScript(weather.yahoo,Location1)" default=""/>
New Setting Format
|
<setting id="test34" type="string" label="32034" help="">
<level>0</level>
<default/>
<constraints>
<allowempty>true</allowempty>
</constraints>
<control type="button" format="action">
<data>RunScript(weather.yahoo,Location1)</data>
</control>
</setting>
|
You can use the variables $ID
and $CWD
in your actions. $ID
will be replaced by your add-on ID and $CWD
with your add-on path:
New Setting Format - Add-on ID
|
<setting>
<control type="button" format="action">
<data>RunPlugin(plugin://$ID/foo)</data>
</control>
</setting>
|
type="fileenum"
fileenum type settings (which was basically a spincontrol listing all items) are no longer supported.
these settings can be converted into a file or folder browser.
<setting type="fileenum" id="test35" label="32035" values="resources"/>
New Setting Format
|
<setting id="test35" type="path" label="32035" help="">
<level>0</level>
<default>/home/ronie/.kodi/addons/script.settings-convert/resources</default>
<control type="button" format="file">
<heading>32035</heading>
</control>
</setting>
|
<setting type="fileenum" id="test36" label="32036" values="resources" mask="/"/>
New Setting Format
|
<setting id="test36" type="path" label="32036" help="">
<level>0</level>
<default>/home/ronie/.kodi/addons/script.settings-convert/resources</default>
<control type="button" format="path">
<heading>32036</heading>
</control>
</setting>
|
<setting type="fileenum" id="test37" label="32037" values="resources" mask="*.txt"/>
New Setting Format
|
<setting id="test37" type="path" label="32037" help="">
<level>0</level>
<default>/home/ronie/.kodi/addons/script.settings-convert/resources</default>
<constraints>
<masking>*.txt</masking>
</constraints>
<control type="button" format="file">
<heading>32037</heading>
</control>
</setting>
|
type="colorbutton"
colorbutton type settings allow a user to open a color picker dialog to select a color from Kodi's default color list.
When the color has been selected, you can preview the colour and the hex code.
Note: Available from Kodi v20
<setting id="test36.color" type="string" label="32035" help="">
<level>0</level>
<default>FF000000</default> <!-- Black -->
<control type="colorbutton" />
</setting>