2020-07-09, 16:06
Hello! I have wanted to make an Add-On for KODI. So I started out with an example. After I have got an Idea about what I'm going to make I started to add some menus. Without success. Well this is my addon.xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.hello.world" name="Hello World" version="1.0.2" provider-name="zag">
<requires>
<import addon="xbmc.python" version="2.23.0"/>
</requires>
<extension point="xbmc.python.script" library="addon.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<summary lang="en">Popup Hello World</summary>
<description lang="en">Example Script to show Hello World</description>
<license>GNU General Public License, v2</license>
<language></language>
<forum>http://forum.kodi.tv/showthread.php?tid=209948</forum>
<source>https://github.com/zag2me/script.hello.world</source>
<website>Kodi.tv</website>
<email>zag@kodi.org</email>
<assets>
<icon>icon.png</icon>
<fanart>fanart.jpg</fanart>
<screenshot>resources/screenshot-01.jpg</screenshot>
<screenshot>resources/screenshot-02.jpg</screenshot>
<screenshot>resources/screenshot-03.jpg</screenshot>
</assets>
<news>Updated the addon to use new addon.xml metadata</news>
</extension>
<extension point="kodi.context.item">
<menu id="kodi.core.main">
<menu>
<label>My submenu</label>
<item library="contextitem1.py">
<label>30001</label>
<visible>true</visible>
</item>
<item library="contextitem2.py">
<label>30002</label>
<visible>true</visible>
</item>
<menu>
<label>Subsubmenu</label>
<item library="contextitem3.py">
<label>30003</label>
<visible>true</visible>
</item>
</menu>
</menu>
</extension>
</addon>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.hello.world" name="Hello World" version="1.0.2" provider-name="zag">
<requires>
<import addon="xbmc.python" version="2.23.0"/>
</requires>
<extension point="xbmc.python.script" library="addon.py">
<provides>executable</provides>
</extension>
<extension point="xbmc.addon.metadata">
<platform>all</platform>
<summary lang="en">Popup Hello World</summary>
<description lang="en">Example Script to show Hello World</description>
<license>GNU General Public License, v2</license>
<language></language>
<forum>http://forum.kodi.tv/showthread.php?tid=209948</forum>
<source>https://github.com/zag2me/script.hello.world</source>
<website>Kodi.tv</website>
<email>zag@kodi.org</email>
<assets>
<icon>icon.png</icon>
<fanart>fanart.jpg</fanart>
<screenshot>resources/screenshot-01.jpg</screenshot>
<screenshot>resources/screenshot-02.jpg</screenshot>
<screenshot>resources/screenshot-03.jpg</screenshot>
</assets>
<news>Updated the addon to use new addon.xml metadata</news>
</extension>
<extension point="kodi.context.item">
<menu id="kodi.core.main">
<menu>
<label>My submenu</label>
<item library="contextitem1.py">
<label>30001</label>
<visible>true</visible>
</item>
<item library="contextitem2.py">
<label>30002</label>
<visible>true</visible>
</item>
<menu>
<label>Subsubmenu</label>
<item library="contextitem3.py">
<label>30003</label>
<visible>true</visible>
</item>
</menu>
</menu>
</extension>
</addon>