2021-02-26, 17:04
I tested a number of skins and so far only Estuary is displaying the help strings. Looks like we'll have to nudge the skinners.
Jeff
Jeff
(2019-12-16, 03:03)ronie Wrote: During the development of Kodi Leia, we've added support for addons to use the same settings format as Kodi itself uses.@ronie Ran into one issue during conversion, the change below fixed it. Thanks for the script it works great!
Due to some initial bugs that couldn't be fixed in time before the v18 release, we've never promoted the use of this settings format for addons.
Over the past few months, these issues have been fixed.
If you're running a nightly v19 build and plan to submit your addon to the addon repo for Matrix,
there shouldn't be any reason to stop you from migrating your settings.xml file to the new format.
Here's an addon that will do (or at least try to) the hard work for you:
script.settings-convert-0.0.11.zip
(please make a backup of your settings.xml file before running this script)
In case you prefer not to depend on automated tools and rather do it manually, there's a wiki page where i tried to cover as much as i could think of:
https://kodi.wiki/view/Add-on_settings_conversion
to:python:grouplabel = attributes['label']
python:grouplabel = attributes.get('label','')
xml:
<dependencies>
<dependency type="enable">
<condition on="property" name="InfoBool">system.platform.android</condition>
</dependency>
</dependencies>
xml:<options>
<option>0</option>
<option>5</option>
<option>10</option>
....
</options>
(2021-05-26, 16:25)ronie Wrote: i think you can ommit the label in case you want to display the values..
give this a shot:
xml:<options>
<option>0</option>
<option>5</option>
<option>10</option>
....
</options>
xml:
<setting id="Location1" type="action" label="32202" help="">
<level>0</level>
<default/>
<constraints> <allowempty>true</allowempty> </constraints>
<control type="button" format="action">
<data>RunScript(weather.ozweather,Location1)</data>
</control>
</setting>
xml:
<setting id="Location1" label="32111" type="action" action="RunScript($ID,Location1)" default=""/>
xml:<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>
xml:<setting id="group0_pauseSceneName" type="text" label="30036" default="Not selected" enable="false" visible="eq(-1,true) + eq(-8,true)" />
xml:
<dependencies>
<dependency type="enable">
<condition on="property" name="InfoBool">false</condition>
</dependency>
<dependency type="visible">
<and>
<condition operator="is" setting="group0_pauseBehavior">true</condition>
<condition on="property" name="InfoBool"> eq(-8,true)</condition>
</and>
</dependency>
</dependencies>
2021-08-30 21:36:26.439 T:12516 ERROR <general>:
EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'xml.etree.ElementTree.ParseError'>
Error Contents: not well-formed (invalid token): line 4, column 136
Traceback (most recent call last):
File "D:\Program Files (x86)\Kodi v19.1 x64\portable_data\addons\script.settings-convert\default.py", line 844, in <module>
Main()
File "D:\Program Files (x86)\Kodi v19.1 x64\portable_data\addons\script.settings-convert\default.py", line 47, in __init__
newsettings = self.updateSettings(settingsxml)
File "D:\Program Files (x86)\Kodi v19.1 x64\portable_data\addons\script.settings-convert\default.py", line 78, in updateSettings
data = ET.parse(settingsxml).getroot()
File "D:\Program Files (x86)\Kodi v19.1 x64\system\python\Lib\xml\etree\ElementTree.py", line 1202, in parse
tree.parse(source, parser)
File "D:\Program Files (x86)\Kodi v19.1 x64\system\python\Lib\xml\etree\ElementTree.py", line 595, in parse
self._root = parser._parse_whole(source)
File "<string>", line None
xml.etree.ElementTree.ParseError: not well-formed (invalid token): line 4, column 136
-->End of Python script error report<--