<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Takoi</id>
	<title>Official Kodi Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://kodi.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Takoi"/>
	<link rel="alternate" type="text/html" href="https://kodi.wiki/view/Special:Contributions/Takoi"/>
	<updated>2026-06-19T08:30:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_structure&amp;diff=124469</id>
		<title>Add-on structure</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_structure&amp;diff=124469"/>
		<updated>2016-09-24T11:06:54Z</updated>

		<summary type="html">&lt;p&gt;Takoi: remove legacy string ranges. only skins have a reserved range&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the add-ons system introduced in the Dharma release (v10) of XBMC.  This system allows 3rd party-developed enhancements to Kodi to be distributed to Kodi users directly from inside the Kodi interface.&lt;br /&gt;
&lt;br /&gt;
The add-ons system is based on the plugin library [http://www.c-pluff.org c-pluff].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Each add-on is kept in its own folder, and is described via an XML file named &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt;.  In addition, some other files can also come with the add-on, such as &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;changelog.txt&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;fanart.jpg&amp;lt;/code&amp;gt;.  These are all optional, though we encourage you to at least have &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;.  All of these reside in the &amp;quot;root&amp;quot; of the folder that contains the add-on.  Additional data may be contained within a &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; subfolder, such as language translations and descriptions of settings.&lt;br /&gt;
&lt;br /&gt;
When installed, the whole add-on folder will be placed inside &amp;lt;code&amp;gt;.xbmc/addons/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Directory Name ==&lt;br /&gt;
&lt;br /&gt;
Your directory name should follow this convention: &amp;lt;code&amp;gt;&amp;lt;addon-type&amp;gt;[.&amp;lt;media-type&amp;gt;].&amp;lt;your-plugin-name&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each name part is case sensitive and must be in lower case. The dot character separates each name part; you can use further dots to separate things in your plugin name if you wish. Alternatively, you may use a hyphen (-). No other non-alphanumeric characters should be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;addon-type&amp;lt;/code&amp;gt; is one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Add-on Type&lt;br /&gt;
!Description&lt;br /&gt;
!Media Type Required?&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;repository&amp;lt;/code&amp;gt;&lt;br /&gt;
|A repository definition file that allows users to add new repositories to the Kodi addon manager.&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|A plugin script or module that adds to the functionality of XBMC. Plugins appear under the relevant media section of the main home menu.&lt;br /&gt;
|&#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|A runnable program file that will appear in the Program section of the main home menu.&lt;br /&gt;
|&#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;skin&amp;lt;/code&amp;gt;&lt;br /&gt;
|An Kodi skin definition and its supporting script files.&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;resource&amp;lt;/code&amp;gt;&lt;br /&gt;
|An addon that will provide additional files (language files, images, [[sounds.xml|uisounds]]).&lt;br /&gt;
|No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following table describes the available &amp;lt;code&amp;gt;media-type&amp;lt;/code&amp;gt;s for the available add-on types. Your add-on may provide more than one &amp;lt;code&amp;gt;media-type&amp;lt;/code&amp;gt; if&lt;br /&gt;
you wish, whereby it will appear in more than one section. In most cases, however, a single media type will suffice, and it may be preferable to have multiple add-ons each providing a single media type rather than one add-on that tries to do it all.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Add-on Type&lt;br /&gt;
!Media Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|A music add-on that will appear in the Music main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|A video add-on that will appear in the Video main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;picture&amp;lt;/code&amp;gt;&lt;br /&gt;
|A picture add-on that will appear in the Pictures main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|A weather add-on that will appear in the Weather main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt;&lt;br /&gt;
|A script plugin that will not appear under a category or within the Add-ons manager, but provides support for other add-ons.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt;&lt;br /&gt;
|A script that will be run at either login or startup&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The add-on name is up to you, but be sure that it isn&#039;t already in use by another add-on. For instance, if you are creating an add-on that integrates the Gpodder software with Kodi for audio podcasts you might name your directory &amp;lt;code&amp;gt;plugin.audio.gpodder-xbmc3&amp;lt;/code&amp;gt;. If you are creating a screen scraper to present TV shows from MyGreatTv.com. It might be &amp;lt;code&amp;gt;plugin.video.my-great-tv-com&amp;lt;/code&amp;gt;. A script to ping all your friends on twitter to tell them you are home might be called&lt;br /&gt;
&amp;lt;code&amp;gt;script.service.ping-twits-i-am-home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Directory structure ==&lt;br /&gt;
&lt;br /&gt;
Your directory contains all the resources needed to operate your add-on. The directory must be considered read-only and should not be used for storing transient or inter-session data. Other mechanisms are available to do that (more later). The directory should be structured as follows:&lt;br /&gt;
&lt;br /&gt;
=== Kodi v17 Krypton and up===&lt;br /&gt;
 addon.py&lt;br /&gt;
 addon.xml&lt;br /&gt;
 LICENSE.txt&lt;br /&gt;
 resources/&lt;br /&gt;
   settings.xml&lt;br /&gt;
   language/&lt;br /&gt;
   lib/&lt;br /&gt;
   data/&lt;br /&gt;
   media/&lt;br /&gt;
   fanart.jpg&lt;br /&gt;
   icon.png&lt;br /&gt;
&lt;br /&gt;
=== Kodi v16 Jarvis and earlier===&lt;br /&gt;
 addon.py&lt;br /&gt;
 addon.xml&lt;br /&gt;
 fanart.jpg&lt;br /&gt;
 icon.png&lt;br /&gt;
 LICENSE.txt&lt;br /&gt;
 changelog.txt&lt;br /&gt;
 resources/&lt;br /&gt;
   settings.xml&lt;br /&gt;
   language/&lt;br /&gt;
   lib/&lt;br /&gt;
   data/&lt;br /&gt;
   media/&lt;br /&gt;
&lt;br /&gt;
Other files may be required to run your add-on, if your add-on becomes more complex. It is considered good practice to place various add-on resources and support code modules in the &amp;lt;code&amp;gt;lib/&amp;lt;/code&amp;gt; folder. If those libs are commonly used by multiple add-ons, consider adding them as a separate add-on, e.g. &amp;lt;code&amp;gt;script.module.foo&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The most important thing to remember from this is that everything that doesn&#039;t need to be in the root of your directory is considered a resource and should be placed inside &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; or one of its subdirectories. Also remember, all the above is a &#039;&#039;recommended&#039;&#039; outline for your add-on; if you need fewer or more&lt;br /&gt;
directories to organise your work, just change it. For instance, skins are add-ons that will require more directories than this.&lt;br /&gt;
&lt;br /&gt;
=== addon.py ===&lt;br /&gt;
&lt;br /&gt;
This will contain the main Python code for your add-on. You can name it whatever you want, since you&#039;ll define this Python file in &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; as your main script file.&lt;br /&gt;
&lt;br /&gt;
=== addon.xml ===&lt;br /&gt;
{{See also|addon.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; gives Kodi important metadata about your add-on, such as:&lt;br /&gt;
* what the add-on provides&lt;br /&gt;
* what the add-on relies on to work&lt;br /&gt;
* what script to run when it is fired up (if it is meant to be started)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== changelog.txt ===&lt;br /&gt;
&lt;br /&gt;
{{note|Deprecated in Kodi v17 Krypton. Replaced by [[Addon.xml#.3Cnews.3E]]}}&lt;br /&gt;
&lt;br /&gt;
A text file that contains a description of the changes you make to the add-on for each release.  This is displayed in the Kodi addon installation/update system. The recommended format is to have it sorted by version in descending order, with a simple description as to the major changes (new functionality, big fixes, etc) in each version. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that&lt;br /&gt;
they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is a sample&lt;br /&gt;
&amp;lt;code&amp;gt;changelog.txt:&lt;br /&gt;
&lt;br /&gt;
 v0.1.3 (2015-12-25)&lt;br /&gt;
 - Update with 15.0 Isengard&lt;br /&gt;
 &lt;br /&gt;
 v0.1.2  (2014-1-15)&lt;br /&gt;
 - Add notification for Ubuntu users checking through apt command&lt;br /&gt;
 &lt;br /&gt;
 v0.1.1  (2014-1-1)&lt;br /&gt;
 - Initial version&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommend to add a date so users know when last update was done. Best is to use YYYY-MM-DD as this is the least confusing way of dat notation.&lt;br /&gt;
&lt;br /&gt;
=== icon.png ===&lt;br /&gt;
&lt;br /&gt;
This is an icon used to represent your add-on in various parts of XBMC. In order to keep a coherent look and give the skinner a good idea how the icons of the add-ons look, we have defined the following rules:&lt;br /&gt;
&lt;br /&gt;
* The icon size must be 256x256 pixels or 512x512 pixels.&lt;br /&gt;
* File format is PNG.&lt;br /&gt;
* Background must be 100% solid. That doesn&#039;t mean one color, it also can be a gradient or a low contrast texture. Just make sure there is no transparency.&lt;br /&gt;
* Keep the logo as simple a possible, no exaggerated 3D effects or high contrast textures.&lt;br /&gt;
* Use a padding of at least 25px for your logo (not the background!). Excepted are large text logos (see icon for themoviedb.org).&lt;br /&gt;
* Keep text to a minimum. However, a text logo along with the graphical logo is recommended in order to easily recognize the addon.&lt;br /&gt;
* Don&#039;t mix logos with XBMC&#039;s logo; it&#039;s obvious that we&#039;re talking about Kodi here.&lt;br /&gt;
* Don&#039;t add borders or any overlays, that&#039;s the skinner&#039;s job. However, if borders are an element of your logo, make sure there is enough padding.&lt;br /&gt;
* It is suggested that a logo on a plain background (non-transparent) is best in many situations (e.g. for addons that retrieve media from an online service, use that service&#039;s logo &#039;&#039;as long as you are free to do so&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=== fanart.jpg ===&lt;br /&gt;
&lt;br /&gt;
This helps to keep Kodi graphically rich when browsing and using add-ons. Some simple guidelines:&lt;br /&gt;
&lt;br /&gt;
* It should be 16:9 aspect ratio&lt;br /&gt;
* It is intended for the background, so should be simple and without text where reasonable.&lt;br /&gt;
* We recommend a 1280x720 JPEG image.  It should certainly be no larger than 1920x1080.&lt;br /&gt;
* We recommend keeping it as small as is reasonable with respect to file-size.  Remember that hundreds of thousands of users are going to be downloading this.&lt;br /&gt;
&lt;br /&gt;
=== LICENSE.txt ===&lt;br /&gt;
{{See also|Submitting_Add-ons#Repository_Submission_Guidelines_-_Please_Read_Before_Submitting_Your_Addon|label 1=Repository guidelines}}&lt;br /&gt;
&lt;br /&gt;
This file should contain the text of whatever software license you&#039;ve chosen to release your add-on under (e.g. GPLv2).&lt;br /&gt;
&lt;br /&gt;
=== resources/ ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; subdirectory is the preferred place to put any files that the add-on uses that don&#039;t need to be stored in the root directory. For instance, translations, software libraries, and image resources would go in &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; or one of its subdirectories.&lt;br /&gt;
&lt;br /&gt;
==== resources/settings.xml ====&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
This is an XML file that defines the user-configurable settings used by the add-on. The file defines the names and types of the settings, and how they should appear in the settings dialog for the add-on.&lt;br /&gt;
&lt;br /&gt;
==== resources/language/ ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Translation tools:&#039;&#039;&#039;&lt;br /&gt;
* [[Language support]]&lt;br /&gt;
* [[Translation System]]&lt;br /&gt;
* Convert .xml to .po: [https://github.com/alanwww1/xbmc-xml2po xbmc-xml2po]&lt;br /&gt;
* Check for .po files: [https://github.com/alanwww1/xbmc-checkpo xbmc-checkpo]&lt;br /&gt;
* Utility for keeping Kodi upstream language files and the language files hosted on transifex.com in sync: [https://github.com/alanwww1/xbmc-txupdate xbmc-txupdate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;String ID range:&#039;&#039;&#039;&lt;br /&gt;
* strings 31000 thru 31999 reserved for skins&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;strings.po&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{note|strings.xml will possibly be deprecated after the release of Frodo/Gotham. Frodo and Gotham will still be backwards compatible with .xml}}&lt;br /&gt;
&lt;br /&gt;
==== resources/lib/ ====&lt;br /&gt;
&lt;br /&gt;
Put any module definitions or third party software libraries into this directory.&lt;br /&gt;
&lt;br /&gt;
==== resources/data/ ====&lt;br /&gt;
&lt;br /&gt;
Store any other static data structures your application requires here. Examples might be&lt;br /&gt;
XLT/XSD files or static XML files that contain lookup tables etc.&lt;br /&gt;
&lt;br /&gt;
==== resources/media/ ====&lt;br /&gt;
&lt;br /&gt;
Store any static media (picture, audio, video etc.) files in this directory.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Following pages will explain in more depth to get started. Providing examples, background information and useful links.&lt;br /&gt;
&lt;br /&gt;
* [[Python development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Add-ons]]&lt;br /&gt;
* [[:Category:All add-ons]]&lt;br /&gt;
* [[3rd party add-on repositories]]&lt;br /&gt;
&#039;&#039;&#039;Development:&#039;&#039;&#039;&lt;br /&gt;
* [[Add-on development]]&lt;br /&gt;
* [[Addon Settings]]&lt;br /&gt;
* [[Python development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
* [[Add-on repositories]]&lt;br /&gt;
* [[Official add-on repository]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_rules&amp;diff=124462</id>
		<title>Add-on rules</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_rules&amp;diff=124462"/>
		<updated>2016-09-24T10:41:41Z</updated>

		<summary type="html">&lt;p&gt;Takoi: remove old screenshot rules&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
=== Repository Submission Guidelines - Please Read Before Submitting Your Addon ===&lt;br /&gt;
&lt;br /&gt;
Inclusion in the Kodi.org repository is at the sole discretion of Team Kodi. Because maintaining such a large repository is a large task, we have set some guidelines for inclusion. Please ensure that these guidelines are met before submitting request to be added.&lt;br /&gt;
In order to be considered for the official repository, the following guidelines must be met:&lt;br /&gt;
* All add-ons must be developed as described on the [[Add-on development]] page.&lt;br /&gt;
* You &#039;&#039;must&#039;&#039; include a license file (named LICENSE.txt). We recommend the [http://creativecommons.org/choose/non-web-popup?license_code=by-sa&amp;amp;jurisdiction=&amp;amp;version=3.0&amp;amp;lang=en CC-BY-SA 3.0] for skins and the [http://www.gnu.org/licenses/gpl-howto.html GPL v2+] for others, but most copy left licenses will suffice. Please investigate which license suits your needs and you fully understand the contents.&lt;br /&gt;
* All files must be free and legal to distribute.&lt;br /&gt;
* The add-on must not violate any known copyright laws - if in doubt, let us know and we&#039;ll look into it for you.&lt;br /&gt;
* All source files must be included. No pre-compiled files will be allowed.&lt;br /&gt;
* You acknowledge that you are the maintainer of your add-on.&lt;br /&gt;
* Team-Kodi reserves the right to update or remove it at any time as we deem necessary.&lt;br /&gt;
* If a new stable Kodi is going to be released no new submissions are accepted to the repository for the previous version. This will start from when the first [http://en.wikipedia.org/wiki/Release_candidate#Release_candidate release candidate (RC)] of the new version is released. Only fixes and updates will be accepted and processed for the previous version (e.g. if the current stable is 13.x, no updates are allowed for 11.x any more). See: [[Submitting Add-ons#Allowed submissions|Allowed submissions]]&lt;br /&gt;
* Monetization of add-ons (for instance advertising or paid subscriptions) will not be allowed. We can make an exception in case you own the copyright for the content the add-on provides. Please contact us on the forum (or add-on mailing list) if you believe such an exception may apply to your add-on.&lt;br /&gt;
* All xbmc.python.module addons must be used by at least one other add-on in official repository.&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
Keep in mind that add-ons in the official repository should be considered &#039;&#039;stable&#039;&#039;. This means that they should be well-tested before you submit them for inclusion.&lt;br /&gt;
Because they are for stable users, they should avoid being updated too often. Too often is of course subjective. If your add-on is in rapid development, and features are constantly being added, hold off until you have hit a good stopping point and &#039;&#039;tested&#039;&#039; the current version.&lt;br /&gt;
&lt;br /&gt;
This means that you should &#039;&#039;not&#039;&#039; submit a request every time you change your code. If you are submitting updates more than once per week something is wrong. Once or twice per month is probably a better goal, barring unforeseen conditions (like a content source changing its paths). With good reasons provided we will of course make exceptions as we strive to prove the best user experience.&lt;br /&gt;
&lt;br /&gt;
=== General requirements ===&lt;br /&gt;
Here&#039;s a list of what basic sanity checks are done by repository maintainer on each submission.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Basic file checks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* all strings used by add-ons must be localized, no hard-coded language strings should ever be used&lt;br /&gt;
* all paths should be treated as case-sensitive, so that they work on all OSs and file systems.&lt;br /&gt;
* all paths and files should be lower-case due to the previous point&lt;br /&gt;
** exceptions are README, COPYING, LICENSE.txt that should be upper-case and the &amp;quot;Default&amp;quot; directory in &amp;lt;tt&amp;gt;resources/skins&amp;lt;/tt&amp;gt;, for add-ons that need it.&lt;br /&gt;
* exception are the translation Language folders with should be first letter capitalised.&lt;br /&gt;
* the following file-types are not allowed: .so .dll .pyo .exe .xbt .xpr Thumbs.db and so on&amp;lt;any binary files&amp;gt;&lt;br /&gt;
* all text files should use UNIX end-of-line&lt;br /&gt;
* all .xml files must pass xml validation&lt;br /&gt;
* all .xml files must have xml declaration as header&lt;br /&gt;
* all .xml/.txt must have unix style EOL&#039;s&lt;br /&gt;
* don&#039;t use a BOM at the start of your files&lt;br /&gt;
* file permissions: files should not be marked as executable&lt;br /&gt;
* filenames must have correct encoding (for skins: check your studio logos for corrupt filenames)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Things that must be included:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*  [[Add-on structure#addon.xml|addon.xml]] must contain correct and valid info / version&lt;br /&gt;
*  [[Add-on structure#icon.png|icon.png]] must be present (256x256) or (512x512)&lt;br /&gt;
*  [[Add-on structure#fanart.jpg|fanart.jpg]] must be present (1280x720 or 1920x1080)&lt;br /&gt;
*  [[Add-on structure#LICENSE.txt|LICENCE.txt]] must be present&lt;br /&gt;
{{See also|Add-on_structure}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Things that can&#039;t be included:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* no .xbt files (these will be generated by our repository)&lt;br /&gt;
* no other add-ons included  (skinners: if you need a script, submit it separately and depend on it)&lt;br /&gt;
* don&#039;t include unneeded files (.pdf, .doc, thumbs.db, etc...)&lt;br /&gt;
* no licensed fonts / background images / anything&lt;br /&gt;
&lt;br /&gt;
=== Requirements for skins ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Basic checks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* The file size must be sane. There is no hard limit, but a 100mb skin is pushing it.&lt;br /&gt;
* No mods. Mods are great, and pop up frequently in the forums. But they are only confusing to non-forum-goers. This can be vague, each is evaluated on its own merit. By naming your &amp;quot;mod&amp;quot; different and make it substantial different enough, we will of course take it in consideration.&lt;br /&gt;
* Due to a bug in TexturePacker, all graphics files should have a resolution of at least 4x4.&lt;br /&gt;
* themes must be in a subfolder of the themes/ folder in the skin root (eg. skin.foo/themes/blue/&amp;lt;files&amp;gt;). The .xbt file will be created by our repo backend.&lt;br /&gt;
* If you want to have some images outside of Textures.xbt, then make sure you place those images outside of the media/ folder and reference them using special://skin/backdrops/* or similar.  This is most useful for backgrounds - it keeps the size of the packed textures down.  Any images you have in the media/ folder will be placed in Textures.xbt in the official repository.&lt;br /&gt;
* Please be careful with addon dependencies. Only add dependencies that are needed for the skin to function properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Code checks:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* all labels must be localized&lt;br /&gt;
* code should be case-sensitive&lt;br /&gt;
* skins should not create warning/errors in the logfile, this can be a lot of things:&lt;br /&gt;
:* invalid includes&lt;br /&gt;
:* undefined actions&lt;br /&gt;
:* unable to evaluate condition&lt;br /&gt;
:* undefined vars&lt;br /&gt;
:* can&#039;t focus &#039;id&#039;&lt;br /&gt;
&lt;br /&gt;
{{Note|This of course also applies to script add-ons that use skin files}}&lt;br /&gt;
&lt;br /&gt;
==== Optional support ====&lt;br /&gt;
&lt;br /&gt;
This is optional and should not block inclusion in official repo.&lt;br /&gt;
&lt;br /&gt;
* mouse support&lt;br /&gt;
* touchscreen support&lt;br /&gt;
* peripheral dialogs&lt;br /&gt;
* PVR support&lt;br /&gt;
* ADSP support&lt;br /&gt;
* RDS support&lt;br /&gt;
&lt;br /&gt;
=== Requirements for scripts and plugins ===&lt;br /&gt;
&lt;br /&gt;
* all special:// paths should be translated using xbmc.translatePath(&amp;quot;special://foo/bar&amp;quot;)&lt;br /&gt;
* xbmc.translatePath(xbmcaddon.Addon().getAddonInfo(&#039;path&#039;)).decode(&#039;utf-8&#039;) should be used for files included with the add-on&lt;br /&gt;
* xbmc.translatePath(xbmcaddon.Addon().getAddonInfo(&#039;profile&#039;)).decode(&#039;utf-8&#039;) should be used for storing add-on related files&lt;br /&gt;
* direct access to the Kodi database is &#039;&#039;&#039;not&#039;&#039;&#039; allowed. You must use [[JSON RPC]] for this.&lt;br /&gt;
* directly using analytics (Google Analytics for example) from within add-ons is not allowed. This should be handled server side by using user-agent.&lt;br /&gt;
* addons should use the xbmc.log() method to write to the logfile and use the debug logging level only. print statements should not be used. &lt;br /&gt;
* add-ons should store all their data in their own subfolder inside the addon_data directory. Access (read/write/delete) to any other files / folders is not allowed by default.&lt;br /&gt;
&#039;&#039;Exceptions to this rule may be granted in specific cases only. Please contact Team XBMC&#039;s add-on repository maintainers via the add-on mailing list if your add-on needs access to such files.&#039;&#039;&lt;br /&gt;
In case we grant such an exception for your addon, access (read/write/delete) to other files/directories must be opt-in by the user, and be clear for the user to understand what is being accessed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Requirements for scrapers ===&lt;br /&gt;
* scraper must return the following minimum information: movie title, year, plot, cast, poster, fanart&lt;br /&gt;
* use &#039;chain function&#039; for calling functions in common scrapers&lt;br /&gt;
* remove the deprecated XML tags from the scraper header in case you use a scraper editor made for pre-Dharma versions of XBMC&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Team Kodi specific notes]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Create_a_repository_for_add-ons&amp;diff=124008</id>
		<title>Archive:Create a repository for add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Create_a_repository_for_add-ons&amp;diff=124008"/>
		<updated>2016-08-21T09:52:39Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]|[[Add-on repositories]]}}&lt;br /&gt;
&lt;br /&gt;
{{outdated}}&lt;br /&gt;
&lt;br /&gt;
See [[Add-on_repositories]] for up-to-date reference documentation.&lt;br /&gt;
&lt;br /&gt;
When you have created your repository, feel free to add it to the [[3rd party add-on repositories]] list.&lt;br /&gt;
&lt;br /&gt;
== Things you will require ==&lt;br /&gt;
* Any HTTP server. A popular method is to use the svn or git source code servers of googlecode, gitorious and github.&lt;br /&gt;
** In your code project page, make sure you set up the correct version control system (source tab). Most skins use SVN.&lt;br /&gt;
** This will get you the right checkout address (link) and folder structure.&lt;br /&gt;
* A folder containing one or more add-on.&lt;br /&gt;
** Start by installing an svn program (like Tortoisesvn).&lt;br /&gt;
** Right click the empty folder, choose &#039;SVN Checkout&#039; to let it build a folder structure inside.&lt;br /&gt;
** Make sure you get asked for authentication (!), the folders look like your source code server.&lt;br /&gt;
** If you don&#039;t get asked for authentication check your server settings and http vs https links.&lt;br /&gt;
** Make a test.txt file in the trunk, right click to mark it as &#039;add&#039; and use and use &#039;SVN Commit&#039; on top folder.&lt;br /&gt;
* Make the following two files using the python code below. These 2 files are made from the addon.xml files in the folders below (from the addons). Where you can have your addon unzipped (or zipped as long as there is an addon.xml file next to it, that is always up to date with the one in the zip).&lt;br /&gt;
** A master addon&#039;&#039;&#039;s&#039;&#039;&#039;.xml file. This file contains metadata about all available add-ons.&lt;br /&gt;
** A checksum of the above file (this file only contains a hash of addons.xml).&lt;br /&gt;
* A zipped repository add-on for distribution. This allows you to share your repository with others.&lt;br /&gt;
** Easiest way is to have a look at another repository file and change the name, info and links.&lt;br /&gt;
** You can also have a look at how other repos set up their folder structure.&lt;br /&gt;
&lt;br /&gt;
You can use the &amp;lt;tt&amp;gt;create_repository.py&amp;lt;/tt&amp;gt; script to generate the &amp;lt;tt&amp;gt;addons.xml&amp;lt;/tt&amp;gt; metadata and the signature. The script will package up your add-ons from your source folders or it can fetch the sources directly from a Git repository.&lt;br /&gt;
&lt;br /&gt;
* For Windows users: Install the latest version of &amp;lt;tt&amp;gt;Python.msi&amp;lt;/tt&amp;gt; (from their website) in its default directory. Python (.py) files should now be associated with python.exe and can be run like a program.&lt;br /&gt;
* [https://raw.githubusercontent.com/chadparry/kodi-repository.chad.parry.org/master/tools/create_repository.py Download the &amp;lt;tt&amp;gt;create_repository.py&amp;lt;/tt&amp;gt; script from GitHub with this link] or with this command:&lt;br /&gt;
 wget https://raw.githubusercontent.com/chadparry/kodi-repository.chad.parry.org/master/tools/create_repository.py &amp;amp;&amp;amp; chmod +x create_repository.py&lt;br /&gt;
* Run the script, and pass it the location of your add-ons. The location can be a local folder, a local ZIP file, or a Git repository URL.&lt;br /&gt;
For example, if you have one zipped add-on and one add-on folder, then the following command will create the add-on repository in the current directory:&lt;br /&gt;
 ./create_repository.py ~/my.spectacular.project.zip ~/development.project/&lt;br /&gt;
The &amp;lt;tt&amp;gt;--datadir&amp;lt;/tt&amp;gt; option can specify a different directory for the repository. The &amp;lt;tt&amp;gt;--compressed&amp;lt;/tt&amp;gt; flag uses gzip on the addons.xml file. Also, a Git URL can have an optional &amp;lt;tt&amp;gt;#&#039;&#039;branch&#039;&#039;&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;#&#039;&#039;tag&#039;&#039;&amp;lt;/tt&amp;gt; and optional &amp;lt;tt&amp;gt;:&#039;&#039;path&#039;&#039;&amp;lt;/tt&amp;gt; at the end to designate the add-on&#039;s location within the repository.&lt;br /&gt;
For example, if you are publishing two add-ons that are both stored within separate Git repositories, then the following command would create a compressed repository:&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;./create_repository.py --datadir=~/html/software/kodi --compressed \&lt;br /&gt;
     https://github.com/chadparry/kodi-repository.chad.parry.org.git#release-1.0.0:repository.chad.parry.org \&lt;br /&gt;
     https://github.com/chadparry/kodi-plugin.program.remote.control.browser.git:plugin.program.remote.control.browser&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* Every time you update an add-on, run the script again.&lt;br /&gt;
&lt;br /&gt;
== Repository Files ==&lt;br /&gt;
Repositories are distributed just like any other add-on. In order for you to browse one in XBMC, you&#039;ll need to [[Add-ons_for_XBMC_(Developement)|create an add-on]] and install it. The repository addon extends the xbmc.addon.repository extension point, so in addition to the general XML structure and icons required for an icon, you&#039;ll need an &amp;lt;extension&amp;gt; block specfically pointing to your repository.&lt;br /&gt;
Use the addon.xml of any of the [[3rd party add-on repositories]] as a template.&lt;br /&gt;
Online repositories should always have zip set to true, both for efficiency of download and for the protection that .zip offers by way of verifying the download (i.e. can we unzip it).&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
=== Using your repo to host images ===&lt;br /&gt;
You may as a developer need to host images from time to time.&lt;br /&gt;
Something like photobucket or flickr may work, but you can also use your repo.&lt;br /&gt;
Commit an image to it, and then form the url to it as you would if you were accessing the image via git or svn (like below):&lt;br /&gt;
&lt;br /&gt;
http://xbmc-adult.googlecode.com/svn/trunk/repository.xbmc-adult/icon.png&lt;br /&gt;
&lt;br /&gt;
This can then be accessed easily from python code, or even embedded on the XBMC forums.&lt;br /&gt;
&lt;br /&gt;
=== How to make an add-on self-updating without distributing a repository file ===&lt;br /&gt;
This is optional.&lt;br /&gt;
You still need a repository for this, you just distribute the actual zipped plugin or script, as opposed to the repository file.&lt;br /&gt;
First you need to have a working repository file.&lt;br /&gt;
Copy the equivalent of this code from the addon.xml of your repository file:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.repository&amp;quot;&lt;br /&gt;
              name=&amp;quot;Official XBMC.org Add-on Repository&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;info compressed=&amp;quot;true&amp;quot;&amp;gt;http://mirrors.xbmc.org/addons/dharma-pre/addons.xml&amp;lt;/info&amp;gt;&lt;br /&gt;
    &amp;lt;checksum&amp;gt;http://mirrors.xbmc.org/addons/dharma-pre/addons.xml.md5&amp;lt;/checksum&amp;gt;&lt;br /&gt;
    &amp;lt;datadir zip=&amp;quot;true&amp;quot;&amp;gt;http://mirrors.xbmc.org/addons/dharma-pre&amp;lt;/datadir&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Then simply add it under the other &amp;lt;extension point&amp;gt; entries of your add-on&#039;s addon.xml&lt;br /&gt;
The name= part of this repository extension must never be the same as your add-on.&lt;br /&gt;
&lt;br /&gt;
==More Video Tutorials==&lt;br /&gt;
===Update Your Repository===&lt;br /&gt;
{{youtube|tXzPUs9FaF8}}&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/tXzPUs9FaF8 Video&#039;s Description.]&lt;br /&gt;
&lt;br /&gt;
===Add more Add-ons to your Repository===&lt;br /&gt;
{{youtube|2OPjwdbBSkw}}&lt;br /&gt;
&lt;br /&gt;
[https://youtu.be/2OPjwdbBSkw Video&#039;s Description.]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[3rd party add-on repositories]]&lt;br /&gt;
&#039;&#039;&#039;Development:&#039;&#039;&#039;&lt;br /&gt;
* [[Add-on development]]&lt;br /&gt;
* [[Add-on repositories]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;br /&gt;
[[Category:Repositories]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_repositories&amp;diff=124007</id>
		<title>Add-on repositories</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_repositories&amp;diff=124007"/>
		<updated>2016-08-21T09:49:42Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
{{see also|HOW-TO: Create a Repository to host your Add-on}}&lt;br /&gt;
&lt;br /&gt;
Beginning with Dharma, Kodi includes an interface to browse remote repositories where add-ons can be retrieved. The model is similar to the way many current Linux distributions work, whereby there is a &amp;quot;main&amp;quot; repository that is the default, and additional ones may be added by the user. The [[Official Add-on Repository]] is included with Kodi by default and is maintained by the Kodi team.&lt;br /&gt;
&lt;br /&gt;
After you have created your repository, consider adding it to the [[3rd party add-on repositories]] list.&lt;br /&gt;
&lt;br /&gt;
== Ingredients for a Repository ==&lt;br /&gt;
Repositories were created with the idea that they should be simple and easy enough to setup for anyone interested. The basic requirements are as follows:&lt;br /&gt;
&lt;br /&gt;
* An HTTP server. Any should work.&lt;br /&gt;
* Some add-ons.&lt;br /&gt;
* A master xml file. This file contains metadata about all available add-ons.&lt;br /&gt;
* A checksum of the above file.&lt;br /&gt;
* A repository add-on for distribution. This allows you to share your repository with others.&lt;br /&gt;
&lt;br /&gt;
== Directory Structure ==&lt;br /&gt;
  addon.id&lt;br /&gt;
     addon.id-x.y.z.zip&lt;br /&gt;
     ...&lt;br /&gt;
  addon2.id&lt;br /&gt;
     addon2.id-x.y.z.zip&lt;br /&gt;
     ...&lt;br /&gt;
&lt;br /&gt;
In addition, each add-on directory should contain icon.png, fanart.jpg, changelog-x.y.z.txt and all files from the [[Addon.xml#.3Cassets.3E]] element.&lt;br /&gt;
&lt;br /&gt;
* addon.id should be the same as the addon&#039;s id, which is expected to be unique.&lt;br /&gt;
* x.y.z is the addon&#039;s version, the same should be listed in its version attribute.&lt;br /&gt;
&lt;br /&gt;
== Addons.xml ==&lt;br /&gt;
Kodi expects to fetch a master xml file that contains the information for each add-on inside the repo. This file is named addons.xml - it can be placed external to the main repository of add-on files if you wish. This file merely encapsulates the other addon.xml files in an &amp;lt;addons&amp;gt; tag. See below for the basic structure:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addons&amp;gt;&lt;br /&gt;
  &amp;lt;addon&lt;br /&gt;
    id=&amp;quot;sample.addon1&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/addon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;addon&lt;br /&gt;
    id=&amp;quot;sample.addon2&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/addons&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Repository Add-on ==&lt;br /&gt;
Repositories are distributed just like any other add-on. In order for you to browse one in Kodi, you&#039;ll need to [[Add-ons for Kodi (Developement)|create an add-on]] and install it. The repository addon extends the xbmc.addon.repository extension point, so in addition to the general XML structure, you&#039;ll need an &#039;extension&#039; block as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.repository&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;info&amp;gt;http://example.com/addons/addons.xml&amp;lt;/info&amp;gt;&lt;br /&gt;
    &amp;lt;checksum&amp;gt;http://example.com/addons/addons.xml.md5&amp;lt;/checksum&amp;gt;&lt;br /&gt;
    &amp;lt;datadir&amp;gt;http://example.com/addons/&amp;lt;/datadir&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== info ===&lt;br /&gt;
URL to the main xml file.&lt;br /&gt;
&lt;br /&gt;
When fetching the file, Kodi will request a gzip encoded response. If the server for some reason does not support gzip encoding, it &#039;&#039;may&#039;&#039; be pre-gzipped, in which case it must have a .gz ending ending.&lt;br /&gt;
&lt;br /&gt;
Note: Kodi v15 and older does not support pre-gzipped files and must specify the attribute compressed=&amp;quot;true&amp;quot; to request gzip content encoding.&lt;br /&gt;
&lt;br /&gt;
=== checksum ===&lt;br /&gt;
A text file that identifies the content of &amp;lt;code&amp;gt;&amp;lt;info&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Before fetching the full info file, Kodi will fetch the &amp;quot;checksum&amp;quot; and compare it to the previously fetched one. If changed, the info file will be fetched.  &lt;br /&gt;
&lt;br /&gt;
Note: for historical reason it is called &amp;quot;checksum&amp;quot;, but it is not verified and not required to be a checksum as long as it is changed whenever addons.xml has changed.&lt;br /&gt;
&lt;br /&gt;
=== datadir ===&lt;br /&gt;
URL to the root directory that contains the addons (i.e. the directory holding the addon.id subdirectories). The location of the zip files should be /datadir/addon.id/addon.id-x.y.z.zip.&lt;br /&gt;
If the &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; attribute (Note: this feature has been dropped in v17 Krypton) is set to false, then Kodi assumes that each addon.id directory simply contains the addon itself, i.e. /datadir/addon.id/files for addon. Online repositories should always have zip set to true, both for efficiency of download and for the protection that .zip offers by way of verifying the download (i.e. can we unzip it).&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&#039;&#039;&#039;Development:&#039;&#039;&#039;&lt;br /&gt;
* [[Add-on development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Team Kodi specific notes]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_repositories&amp;diff=124006</id>
		<title>Add-on repositories</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_repositories&amp;diff=124006"/>
		<updated>2016-08-21T09:41:55Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
{{see also|HOW-TO: Create a Repository to host your Add-on}}&lt;br /&gt;
&lt;br /&gt;
Beginning with Dharma, Kodi includes an interface to browse remote repositories where add-ons can be retrieved. The model is similar to the way many current Linux distributions work, whereby there is a &amp;quot;main&amp;quot; repository that is the default, and additional ones may be added by the user. The [[Official Add-on Repository]] is included with Kodi by default and is maintained by the Kodi team.&lt;br /&gt;
&lt;br /&gt;
After you have created your repository, consider adding it to the [[3rd party add-on repositories]] list.&lt;br /&gt;
&lt;br /&gt;
== Ingredients for a Repository ==&lt;br /&gt;
Repositories were created with the idea that they should be simple and easy enough to setup for anyone interested. The basic requirements are as follows:&lt;br /&gt;
&lt;br /&gt;
* An HTTP server. Any should work.&lt;br /&gt;
* Some add-ons.&lt;br /&gt;
* A master xml file. This file contains metadata about all available add-ons.&lt;br /&gt;
* A checksum of the above file.&lt;br /&gt;
* A repository add-on for distribution. This allows you to share your repository with others.&lt;br /&gt;
&lt;br /&gt;
== Directory Structure ==&lt;br /&gt;
  addon.id&lt;br /&gt;
     addon.id-x.y.z.zip&lt;br /&gt;
     changelog-x.y.z.txt&lt;br /&gt;
     fanart.jpg&lt;br /&gt;
     icon.png&lt;br /&gt;
  addon2.id&lt;br /&gt;
     addon2.id-x.y.z.zip&lt;br /&gt;
     changelog-x.y.z.txt&lt;br /&gt;
     fanart.jpg&lt;br /&gt;
     icon.png&lt;br /&gt;
&lt;br /&gt;
* addon.id should be the same as the addon&#039;s id, which is expected to be unique.&lt;br /&gt;
* x.y.z is the addon&#039;s version, the same should be listed in its version attribute.&lt;br /&gt;
&lt;br /&gt;
== Addons.xml ==&lt;br /&gt;
Kodi expects to fetch a master xml file that contains the information for each add-on inside the repo. This file is named addons.xml - it can be placed external to the main repository of add-on files if you wish. This file merely encapsulates the other addon.xml files in an &amp;lt;addons&amp;gt; tag. See below for the basic structure:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addons&amp;gt;&lt;br /&gt;
  &amp;lt;addon&lt;br /&gt;
    id=&amp;quot;sample.addon1&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/addon&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;addon&lt;br /&gt;
    id=&amp;quot;sample.addon2&amp;quot;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/addons&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Repository Add-on ==&lt;br /&gt;
Repositories are distributed just like any other add-on. In order for you to browse one in Kodi, you&#039;ll need to [[Add-ons for Kodi (Developement)|create an add-on]] and install it. The repository addon extends the xbmc.addon.repository extension point, so in addition to the general XML structure, you&#039;ll need an &#039;extension&#039; block as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.repository&amp;quot; name=&amp;quot;My development repository&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;info&amp;gt;http://example.com/addons/addons.xml&amp;lt;/info&amp;gt;&lt;br /&gt;
    &amp;lt;checksum&amp;gt;http://example.com/addons/addons.xml.md5&amp;lt;/checksum&amp;gt;&lt;br /&gt;
    &amp;lt;datadir&amp;gt;http://example.com/addons/&amp;lt;/datadir&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== info ===&lt;br /&gt;
URL to the main xml file.&lt;br /&gt;
&lt;br /&gt;
When fetching the file, Kodi will request a gzip encoded response. If the server for some reason does not support gzip encoding, it &#039;&#039;may&#039;&#039; be pre-gzipped, in which case it must have a .gz ending ending.&lt;br /&gt;
&lt;br /&gt;
Note: Kodi v15 and older does not support pre-gzipped files and must specify the attribute compressed=&amp;quot;true&amp;quot; to request gzip content encoding.&lt;br /&gt;
&lt;br /&gt;
=== checksum ===&lt;br /&gt;
A text file that identifies the content of &amp;lt;code&amp;gt;&amp;lt;info&amp;gt;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Before fetching the full info file, Kodi will fetch the &amp;quot;checksum&amp;quot; and compare it to the previously fetched one. If changed, the info file will be fetched.  &lt;br /&gt;
&lt;br /&gt;
Note: for historical reason it is called &amp;quot;checksum&amp;quot;, but it is not verified and not required to be a checksum as long as it is changed whenever addons.xml has changed.&lt;br /&gt;
&lt;br /&gt;
=== datadir ===&lt;br /&gt;
URL to the root directory that contains the addons (i.e. the directory holding the addon.id subdirectories). The location of the zip files should be /datadir/addon.id/addon.id-x.y.z.zip.&lt;br /&gt;
If the &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; attribute (Note: this feature has been dropped in v17 Krypton) is set to false, then Kodi assumes that each addon.id directory simply contains the addon itself, i.e. /datadir/addon.id/files for addon. Online repositories should always have zip set to true, both for efficiency of download and for the protection that .zip offers by way of verifying the download (i.e. can we unzip it).&lt;br /&gt;
&lt;br /&gt;
In addition, each add-on sub-directory should contain icon.png, fanart.jpg, changelog-x.y.z.txt and all files from the [[Addon.xml#.3Cassets.3E]] element.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&#039;&#039;&#039;Development:&#039;&#039;&#039;&lt;br /&gt;
* [[Add-on development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Team Kodi specific notes]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_structure&amp;diff=124005</id>
		<title>Add-on structure</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_structure&amp;diff=124005"/>
		<updated>2016-08-21T08:55:44Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* changelog.txt */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page summarizes the add-ons system introduced in the Dharma release (v10) of XBMC.  This system allows 3rd party-developed enhancements to Kodi to be distributed to Kodi users directly from inside the Kodi interface.&lt;br /&gt;
&lt;br /&gt;
The add-ons system is based on the plugin library [http://www.c-pluff.org c-pluff].&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Each add-on is kept in its own folder, and is described via an XML file named &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt;.  In addition, some other files can also come with the add-on, such as &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;changelog.txt&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;fanart.jpg&amp;lt;/code&amp;gt;.  These are all optional, though we encourage you to at least have &amp;lt;code&amp;gt;icon.png&amp;lt;/code&amp;gt;.  All of these reside in the &amp;quot;root&amp;quot; of the folder that contains the add-on.  Additional data may be contained within a &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; subfolder, such as language translations and descriptions of settings.&lt;br /&gt;
&lt;br /&gt;
When installed, the whole add-on folder will be placed inside &amp;lt;code&amp;gt;.xbmc/addons/&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Directory Name ==&lt;br /&gt;
&lt;br /&gt;
Your directory name should follow this convention: &amp;lt;code&amp;gt;&amp;lt;addon-type&amp;gt;[.&amp;lt;media-type&amp;gt;].&amp;lt;your-plugin-name&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each name part is case sensitive and must be in lower case. The dot character separates each name part; you can use further dots to separate things in your plugin name if you wish. Alternatively, you may use a hyphen (-). No other non-alphanumeric characters should be used.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;addon-type&amp;lt;/code&amp;gt; is one of the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Add-on Type&lt;br /&gt;
!Description&lt;br /&gt;
!Media Type Required?&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;repository&amp;lt;/code&amp;gt;&lt;br /&gt;
|A repository definition file that allows users to add new repositories to the Kodi addon manager.&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|A plugin script or module that adds to the functionality of XBMC. Plugins appear under the relevant media section of the main home menu.&lt;br /&gt;
|&#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|A runnable program file that will appear in the Program section of the main home menu.&lt;br /&gt;
|&#039;&#039;&#039;Yes&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;skin&amp;lt;/code&amp;gt;&lt;br /&gt;
|An Kodi skin definition and its supporting script files.&lt;br /&gt;
|No&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;resource&amp;lt;/code&amp;gt;&lt;br /&gt;
|An addon that will provide additional files (language files, images, [[sounds.xml|uisounds]]).&lt;br /&gt;
|No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The following table describes the available &amp;lt;code&amp;gt;media-type&amp;lt;/code&amp;gt;s for the available add-on types. Your add-on may provide more than one &amp;lt;code&amp;gt;media-type&amp;lt;/code&amp;gt; if&lt;br /&gt;
you wish, whereby it will appear in more than one section. In most cases, however, a single media type will suffice, and it may be preferable to have multiple add-ons each providing a single media type rather than one add-on that tries to do it all.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
!Add-on Type&lt;br /&gt;
!Media Type&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|A music add-on that will appear in the Music main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|A video add-on that will appear in the Video main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;picture&amp;lt;/code&amp;gt;&lt;br /&gt;
|A picture add-on that will appear in the Pictures main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;plugin&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|A weather add-on that will appear in the Weather main menu.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;module&amp;lt;/code&amp;gt;&lt;br /&gt;
|A script plugin that will not appear under a category or within the Add-ons manager, but provides support for other add-ons.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;script&amp;lt;/code&amp;gt;&lt;br /&gt;
|&amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt;&lt;br /&gt;
|A script that will be run at either login or startup&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The add-on name is up to you, but be sure that it isn&#039;t already in use by another add-on. For instance, if you are creating an add-on that integrates the Gpodder software with Kodi for audio podcasts you might name your directory &amp;lt;code&amp;gt;plugin.audio.gpodder-xbmc3&amp;lt;/code&amp;gt;. If you are creating a screen scraper to present TV shows from MyGreatTv.com. It might be &amp;lt;code&amp;gt;plugin.video.my-great-tv-com&amp;lt;/code&amp;gt;. A script to ping all your friends on twitter to tell them you are home might be called&lt;br /&gt;
&amp;lt;code&amp;gt;script.service.ping-twits-i-am-home&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Directory structure ==&lt;br /&gt;
&lt;br /&gt;
Your directory contains all the resources needed to operate your add-on. The directory must be considered read-only and should not be used for storing transient or inter-session data. Other mechanisms are available to do that (more later). The directory should be structured as follows:&lt;br /&gt;
&lt;br /&gt;
 addon.py&lt;br /&gt;
 addon.xml&lt;br /&gt;
 changelog.txt&lt;br /&gt;
 fanart.jpg&lt;br /&gt;
 icon.png&lt;br /&gt;
 LICENSE.txt&lt;br /&gt;
 resources/&lt;br /&gt;
   settings.xml&lt;br /&gt;
   language/&lt;br /&gt;
   lib/&lt;br /&gt;
   data/&lt;br /&gt;
   media/&lt;br /&gt;
&lt;br /&gt;
Other files may be required to run your add-on, if your add-on becomes more complex. It is considered good practice to place various add-on resources and support code modules in the &amp;lt;code&amp;gt;lib/&amp;lt;/code&amp;gt; folder. If those libs are commonly used by multiple add-ons, consider adding them as a separate add-on, e.g. &amp;lt;code&amp;gt;script.module.foo&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The most important thing to remember from this is that everything that doesn&#039;t need to be in the root of your directory is considered a resource and should be placed inside &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; or one of its subdirectories. Also remember, all the above is a &#039;&#039;recommended&#039;&#039; outline for your add-on; if you need fewer or more&lt;br /&gt;
directories to organise your work, just change it. For instance, skins are add-ons that will require more directories than this.&lt;br /&gt;
&lt;br /&gt;
=== addon.py ===&lt;br /&gt;
&lt;br /&gt;
This will contain the main Python code for your add-on. You can name it whatever you want, since you&#039;ll define this Python file in &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; as your main script file.&lt;br /&gt;
&lt;br /&gt;
=== addon.xml ===&lt;br /&gt;
{{See also|addon.xml}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; gives Kodi important metadata about your add-on, such as:&lt;br /&gt;
* what the add-on provides&lt;br /&gt;
* what the add-on relies on to work&lt;br /&gt;
* what script to run when it is fired up (if it is meant to be started)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== changelog.txt ===&lt;br /&gt;
&lt;br /&gt;
{{note|Deprecated in Kodi v17 Krypton. Replaced by [[Addon.xml#.3Cnews.3E]]}}&lt;br /&gt;
&lt;br /&gt;
A text file that contains a description of the changes you make to the add-on for each release.  This is displayed in the Kodi addon installation/update system. The recommended format is to have it sorted by version in descending order, with a simple description as to the major changes (new functionality, big fixes, etc) in each version. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that&lt;br /&gt;
they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is a sample&lt;br /&gt;
&amp;lt;code&amp;gt;changelog.txt:&lt;br /&gt;
&lt;br /&gt;
 v0.1.3 (2015-12-25)&lt;br /&gt;
 - Update with 15.0 Isengard&lt;br /&gt;
 &lt;br /&gt;
 v0.1.2  (2014-1-15)&lt;br /&gt;
 - Add notification for Ubuntu users checking through apt command&lt;br /&gt;
 &lt;br /&gt;
 v0.1.1  (2014-1-1)&lt;br /&gt;
 - Initial version&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is recommend to add a date so users know when last update was done. Best is to use YYYY-MM-DD as this is the least confusing way of dat notation.&lt;br /&gt;
&lt;br /&gt;
=== icon.png ===&lt;br /&gt;
&lt;br /&gt;
This is an icon used to represent your add-on in various parts of XBMC. In order to keep a coherent look and give the skinner a good idea how the icons of the add-ons look, we have defined the following rules:&lt;br /&gt;
&lt;br /&gt;
* The icon size must be 256x256 pixels.&lt;br /&gt;
* File format is PNG.&lt;br /&gt;
* Background must be 100% solid. That doesn&#039;t mean one color, it also can be a gradient or a low contrast texture. Just make sure there is no transparency.&lt;br /&gt;
* Keep the logo as simple a possible, no exaggerated 3D effects or high contrast textures.&lt;br /&gt;
* Use a padding of at least 25px for your logo (not the background!). Excepted are large text logos (see icon for themoviedb.org).&lt;br /&gt;
* Keep text to a minimum. However, a text logo along with the graphical logo is recommended in order to easily recognize the addon.&lt;br /&gt;
* Don&#039;t mix logos with XBMC&#039;s logo; it&#039;s obvious that we&#039;re talking about Kodi here.&lt;br /&gt;
* Don&#039;t add borders or any overlays, that&#039;s the skinner&#039;s job. However, if borders are an element of your logo, make sure there is enough padding.&lt;br /&gt;
* It is suggested that a logo on a plain background (non-transparent) is best in many situations (e.g. for addons that retrieve media from an online service, use that service&#039;s logo &#039;&#039;as long as you are free to do so&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=== fanart.jpg ===&lt;br /&gt;
&lt;br /&gt;
This helps to keep Kodi graphically rich when browsing and using add-ons. Some simple guidelines:&lt;br /&gt;
&lt;br /&gt;
* It should be 16:9 aspect ratio&lt;br /&gt;
* It is intended for the background, so should be simple and without text where reasonable.&lt;br /&gt;
* We recommend a 1280x720 JPEG image.  It should certainly be no larger than 1920x1080.&lt;br /&gt;
* We recommend keeping it as small as is reasonable with respect to file-size.  Remember that hundreds of thousands of users are going to be downloading this.&lt;br /&gt;
&lt;br /&gt;
=== LICENSE.txt ===&lt;br /&gt;
{{See also|Submitting_Add-ons#Repository_Submission_Guidelines_-_Please_Read_Before_Submitting_Your_Addon|label 1=Repository guidelines}}&lt;br /&gt;
&lt;br /&gt;
This file should contain the text of whatever software license you&#039;ve chosen to release your add-on under (e.g. GPLv2).&lt;br /&gt;
&lt;br /&gt;
=== resources/ ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; subdirectory is the preferred place to put any files that the add-on uses that don&#039;t need to be stored in the root directory. For instance, translations, software libraries, and image resources would go in &amp;lt;code&amp;gt;resources/&amp;lt;/code&amp;gt; or one of its subdirectories.&lt;br /&gt;
&lt;br /&gt;
==== resources/settings.xml ====&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
This is an XML file that defines the user-configurable settings used by the add-on. The file defines the names and types of the settings, and how they should appear in the settings dialog for the add-on.&lt;br /&gt;
&lt;br /&gt;
==== resources/language/ ====&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Translation tools:&#039;&#039;&#039;&lt;br /&gt;
* [[Language support]]&lt;br /&gt;
* [[Translation System]]&lt;br /&gt;
* Convert .xml to .po: [https://github.com/alanwww1/xbmc-xml2po xbmc-xml2po]&lt;br /&gt;
* Check for .po files: [https://github.com/alanwww1/xbmc-checkpo xbmc-checkpo]&lt;br /&gt;
* Utility for keeping Kodi upstream language files and the language files hosted on transifex.com in sync: [https://github.com/alanwww1/xbmc-txupdate xbmc-txupdate]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;String ID range:&#039;&#039;&#039;&lt;br /&gt;
* strings 30000 thru 30999 reserved for plugins and plugin settings&lt;br /&gt;
* strings 31000 thru 31999 reserved for skins&lt;br /&gt;
* strings 32000 thru 32999 reserved for scripts&lt;br /&gt;
* strings 33000 thru 33999 reserved for common strings used in add-ons&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;strings.po&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{{note|strings.xml will possibly be deprecated after the release of Frodo/Gotham. Frodo and Gotham will still be backwards compatible with .xml}}&lt;br /&gt;
&lt;br /&gt;
==== resources/lib/ ====&lt;br /&gt;
&lt;br /&gt;
Put any module definitions or third party software libraries into this directory.&lt;br /&gt;
&lt;br /&gt;
==== resources/data/ ====&lt;br /&gt;
&lt;br /&gt;
Store any other static data structures your application requires here. Examples might be&lt;br /&gt;
XLT/XSD files or static XML files that contain lookup tables etc.&lt;br /&gt;
&lt;br /&gt;
==== resources/media/ ====&lt;br /&gt;
&lt;br /&gt;
Store any static media (picture, audio, video etc.) files in this directory.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
&lt;br /&gt;
Following pages will explain in more depth to get started. Providing examples, background information and useful links.&lt;br /&gt;
&lt;br /&gt;
* [[Python development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Add-ons]]&lt;br /&gt;
* [[:Category:All add-ons]]&lt;br /&gt;
* [[3rd party add-on repositories]]&lt;br /&gt;
&#039;&#039;&#039;Development:&#039;&#039;&#039;&lt;br /&gt;
* [[Add-on development]]&lt;br /&gt;
* [[Addon Settings]]&lt;br /&gt;
* [[Python development]]&lt;br /&gt;
* [[Skinning]]&lt;br /&gt;
* [[Add-on repositories]]&lt;br /&gt;
* [[Official add-on repository]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124004</id>
		<title>Addon.xml</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124004"/>
		<updated>2016-08-21T08:53:40Z</updated>

		<summary type="html">&lt;p&gt;Takoi: fix lang documentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every skin, script, or plugin in Kodi contains an &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file which describes the add-on, providing credits, version information and dependencies. Below, we will explain how this file is structured and which elements must be used to create an add-on for Kodi. You can also consult the examples at the end to see how this file is laid out depending on if you are developing a skin or script.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file has the same basic structure, this example is for a video plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;plugin.addon.id&amp;quot; name=&amp;quot;Your Add-on&amp;quot; version=&amp;quot;1.2.3&amp;quot; provider-name=&amp;quot;You&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;video&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s summary&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s description&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en_gb&amp;quot;&amp;gt;&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few important things to note in the above sample:&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element must be present, and be the root node. It presents data about the add-on package as a whole.&lt;br /&gt;
* Inside the &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element is a &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element, listing all the dependencies that this add-on needs in order to function.&lt;br /&gt;
* Then there are one or more &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; elements, each of which describes a part of Kodi that the add-on extends.&lt;br /&gt;
* Finally, there is a specific &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element that extends &amp;lt;code&amp;gt;&amp;quot;xbmc.addon.metadata&amp;quot;&amp;lt;/code&amp;gt;. This describes the add-on to the user.&lt;br /&gt;
&lt;br /&gt;
= Elements =&lt;br /&gt;
 &lt;br /&gt;
== &amp;lt;addon&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element has 4 attributes, all required: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;provider-name&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;script.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;0.0.1&amp;quot; provider-name=&amp;quot;Dev1, Dev2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== id attribute ===&lt;br /&gt;
&lt;br /&gt;
The id attribute is the unique identifier used for this add-on.  It must be unique, and must use only lowercase characters, periods, underscores, dashes and numbers.  This identifier is also used as the name of the folder that contains the add-on, so for ease of searching, we suggest you use something like &amp;lt;type&amp;gt;.&amp;lt;uniquename&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The version attribute is used by Kodi to determine whether updates are available. This should be use a version scheme like &amp;lt;code&amp;gt;x.y.z&amp;lt;/code&amp;gt; (major.minor.patch). For example: &amp;lt;code&amp;gt;version=&amp;quot;0.0.1&amp;quot;&amp;lt;/code&amp;gt;. Generally, you&#039;ll start with a version of &amp;lt;code&amp;gt;0.y.z&amp;lt;/code&amp;gt; for test releases and once you feel it is ready for a full release, you&#039;d bump the version to &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== How versioning works ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.10&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.3.0&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta3&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta10&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Text should only be added for a beta version. In other cases version number should only contain numbers.}}&lt;br /&gt;
&lt;br /&gt;
=== name attribute ===&lt;br /&gt;
&lt;br /&gt;
The name attribute is the name of the add-on as it appears in the UI.  This should be in English where it makes sense for it to be so, and is not translatable.&lt;br /&gt;
&lt;br /&gt;
=== provider-name attribute ===&lt;br /&gt;
&lt;br /&gt;
The provider-name attribute is used as the author field.  This could be a team of authors or a single author. If the add-on is maintained by multiple people please separate them with a comma (&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;requires&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element contains one or more &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; elements which specify which other add-ons this particular add-on requires, and which version of those add-ons it requires. These add-ons may be part of Kodi itself, or may be parts of other third-party add-ons.&lt;br /&gt;
&lt;br /&gt;
Kodi will only allow the add-on to be run if suitable versions of the (non-optional) add-ons on which this add-on depends are installed. When a user installs your add-on from an online repository via Kodi&#039;s add-on manager, Kodi attempts to resolve these dependencies, and install anything that your add-on relies on first. The dependency must be provided with the minimum version number your script/skin requires.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here is a sample &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; block that imports two required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.14.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, which will only install on OpenELEC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;os.openelec.tv&amp;quot; version=&amp;quot;2.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;import&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element describes one dependency for an add-on, with two required attributes: &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;. There is also an optional attribute called, fittingly, &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If your add-on relies on other third-party add-ons, Kodi will automatically install them as well, provided they are available on an existing add-on repository. If they aren&#039;t available on any existing repository, the user must install the other add-ons themselves. Note that you need to include any Python libraries you need directly in your add-on; these can&#039;t be loaded with an &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element, since Kodi wouldn&#039;t know what to do with them.&lt;br /&gt;
&lt;br /&gt;
=== addon attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; attribute specifies the id of the required add-on, e.g. &amp;lt;code&amp;gt;script.module.elementtree&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; attribute specifies the minimum version of the required add-on to be installed.&lt;br /&gt;
&lt;br /&gt;
==== Dependency versions ====&lt;br /&gt;
&lt;br /&gt;
Each different Kodi version might require you to use a higher version of the &amp;lt;code&amp;gt;xbmc.*&amp;lt;/code&amp;gt; add-on dependencies to control on which version of Kodi the add-on can be installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Current versions&lt;br /&gt;
! Kodi version !! xbmc.python !! xbmc.gui !! xbmc.json !! xbmc.metadata !! xbmc.addon&lt;br /&gt;
|-&lt;br /&gt;
| Dharma 10.1 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 1.0 || 2.11 || 2.0|| 1.0 || 0.1&lt;br /&gt;
|-&lt;br /&gt;
| Eden 11.0 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt; || 2.0 || 3.0 || 4.0 || 1.0 || 11.0&lt;br /&gt;
|-&lt;br /&gt;
| Frodo 12.x &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 2.1.0 || 4.0.0 || 6.0.0 || 2.1.0 || 12.0.0&lt;br /&gt;
|-&lt;br /&gt;
| Gotham 13.x || 2.14.0 (ABI 2.1.0) || 5.0.1 || 6.6.0 (ABI 6.0.0) || 2.1.0 || 13.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Helix 14.x || 2.19.0 (ABI 2.1.0) || 5.3.0 || 6.20.0 (ABI 6.0.0) || 2.1.0 || 14.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Isengard 15.x || 2.20.0 (ABI 2.1.0) || 5.9.0 (ABI 5.3.0) || 6.25.1 (ABI 6.0.0) || 2.1.0 || 15.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Jarvis 16.x || 2.24.0 (ABI 2.1.0) || 5.10.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 16.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Krypton 17.x || 2.25.0 (ABI 2.1.0) || 5.11.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 17.0.0 (ABI 12.0.0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each Kodi version contain a certain backwards compatibility. For example add-ons made for Gotham 13.x can still work ion Jarvis 16.x. Do note that this might change in the future. The &#039;&#039;&#039;ABI&#039;&#039;&#039; version you see in the table above is the backwards compatibility version for which add-ons are still marked &amp;quot;working&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== optional attribute ===&lt;br /&gt;
&lt;br /&gt;
The dependency may be made optional by setting the &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt; attribute to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. This will only install the dependency when the add-on actually needs it. Even if this dependency is missing, the add-on can still be installed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;extension&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element describes the technical aspects of this add-on. It will have at least a point attribute which will give the part of Kodi that the add-on extends. For instance, the &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file for the Confluence skin extends the &amp;lt;code&amp;gt;xbmc.gui.skin&amp;lt;/code&amp;gt; part of xbmc. All available extension points are given below.&lt;br /&gt;
&lt;br /&gt;
The various extension points that Kodi provides are given in the list below.&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Extension point&lt;br /&gt;
!Add-on Category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Skinning|xbmc.gui.skin]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Skin&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.webinterface&amp;lt;/code&amp;gt;&lt;br /&gt;
|Web interface&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Add-on repositories|xbmc.addon.repository]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[HOW-TO:_Automatically_start_addons_using_services|xbmc.service]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Services&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.albums&amp;lt;/code&amp;gt;&lt;br /&gt;
|Album information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.artists&amp;lt;/code&amp;gt;&lt;br /&gt;
|Artist information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.movies&amp;lt;/code&amp;gt;&lt;br /&gt;
|Movie information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.musicvideos&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music video information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.tvshows&amp;lt;/code&amp;gt;&lt;br /&gt;
|TV information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.library&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.ui.screensaver&amp;lt;/code&amp;gt;&lt;br /&gt;
|Screensaver&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.player.musicviz&amp;lt;/code&amp;gt;&lt;br /&gt;
|Visualization&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Plugin sources#What Kodi requires for your add-on|xbmc.python.pluginsource]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script sources#What Kodi requires for your add-on|xbmc.python.script]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|Weather&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.subtitle.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|Subtitle service module&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script lyrics#What Kodi requires for your add-on|xbmc.python.lyrics]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Lyrics&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script library#What Kodi requires for your add-on|xbmc.python.library]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|These don&#039;t show up in the addon browser and are purely as support for other scripts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Picture Add-ons (image)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.images&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional image files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.language&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional language files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add-ons that don&#039;t correspond to a specific add-on category can not be installed by users. These are usually supporting or shared add-ons that are installed automatically by the add-ons that require them.&lt;br /&gt;
&lt;br /&gt;
=== xbmc.python.pluginsource ===&lt;br /&gt;
{{See also|Plugin sources}}&lt;br /&gt;
&lt;br /&gt;
The most common extension point that will be used by plugin addon developers is &amp;lt;code&amp;gt;xbmc.python.pluginsource&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== library attribute ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; element has an extra attribute: &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt;. This is the name of the Python script (startup script) that will be run when the add-on is activated. This file must exist in the root of your add-on directory.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;provides&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
The extension has an additional child element named &amp;lt;code&amp;gt;&amp;lt;provides&amp;gt;&amp;lt;/code&amp;gt;, which contains a whitespace separated list of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;, and/or &amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;. This determines in what area (or context) of the Kodi system your addon will make itself visible in (please note that this applies only to plugin extension points):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Provides&lt;br /&gt;
!Appears in&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Pictures&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|Programs&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|Not visible&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;gpodderxbmc.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;provides&amp;gt;audio video&amp;lt;/provides&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xbmc.addon.metadata ===&lt;br /&gt;
&lt;br /&gt;
This special extension point &#039;&#039;must&#039;&#039; be provided by all add-ons, and is the way that your add-on is described to users of the Kodi add-on manager.&lt;br /&gt;
&lt;br /&gt;
==== Required elements ====&lt;br /&gt;
&lt;br /&gt;
There are several elements that this should contain and all are compulsory (except the broken tag). Each of the elements below must always be present in English as a minimum.&lt;br /&gt;
&lt;br /&gt;
Many of these elements can be translated into multiple languages and should be added once for each supported language. The &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute should contain a [https://en.wikipedia.org/wiki/Locale_(computer_software) locale identifier]. If omitted, it defaults to en_GB. (Note: Kodi v14 and older uses ISO-639 code. See [[List of language codes (ISO-639:1988)]]).&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;summary&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;summary&amp;gt;&amp;lt;/code&amp;gt; elements provide a short summary of what the add-on does. This should be a single sentence. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;description&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;description&amp;gt;&amp;lt;/code&amp;gt; elements provide a more detailed summary of what the add-on does. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;disclaimer&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;disclaimer&amp;gt;&amp;lt;/code&amp;gt; elements that indicate what (if any) things the user should know about the add-on. There is no need to have a disclaimer if you don&#039;t want one, though if something requires settings, or only works in a particular country then you may want to state this here. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en_GB&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;news&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|Used in Kodi v17 Krypton and later only. Older versions are forward compatible.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;news&amp;gt;&amp;lt;/code&amp;gt; element should contains a simple description of the major changes made to the add-on (new functionality, big fixes, etc). This is displayed in the Kodi addon installation/update system. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;news&amp;gt;v0.1.2  (2014-1-15)&lt;br /&gt;
- Added notification for Ubuntu users checking through apt command&amp;lt;/news&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;platform&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;platform&amp;gt;&amp;lt;/code&amp;gt; tag specifies which platforms (operating systems, hardware) this add-on runs on. Many add-ons will run on all platforms, so &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; is an option. If the platform tag is missing, we assume the add-on runs on all platforms. A combination of these is also possible. Currently available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;linux&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx64&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ios&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;windx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;android&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;language&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;language&amp;gt;&amp;lt;/code&amp;gt; elements indicate the language(s) of the &#039;&#039;content&#039;&#039; provided by your add-on. It applies to plugins, scripts, scrapers etc. This allows browsing the add-on list by language. When there is no specific language provided in your content, leave it blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;language&amp;gt;en de fr&amp;lt;/language&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;license&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;license&amp;gt;&amp;lt;/code&amp;gt; element indicates what license is used for this add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;forum&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;forum&amp;gt;&amp;lt;/code&amp;gt; element provides the forum thread URL for this specific add-on. Leave this blank if there is no forum thread.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;forum&amp;gt;http://www.myaddonwebsite.com/forum.php?thread=12345&amp;lt;/forum&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;website&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;website&amp;gt;&amp;lt;/code&amp;gt; element provides the website URL for this specific add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;website&amp;gt;http://www.myaddonwebsite.com/&amp;lt;/website&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element provides the URL for the source code for this specific add-on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source&amp;gt;http://github.com/someone/myaddon&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;email&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/code&amp;gt; element provides the email address of the author if he wishes to do so for this specific add-on. Here are two examples of how you can make it look (the second one it harder for spambots to use). This can be left blank if you do not want to make your email address public.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;email&amp;gt;foo@bar.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;email&amp;gt;foo at bar dot com&amp;lt;/email&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;broken&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;broken&amp;gt;&amp;lt;/code&amp;gt; tag will mark the add-on as broken in the Kodi repo and provide the reason why. You don&#039;t need to do a version bump for this to work. However a bump is recommended as you could also add this to the changelog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;broken&amp;gt;deprecated&amp;lt;/broken&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;assets&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|Kodi v17 Krypton and later.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;assets&amp;gt;&amp;lt;/code&amp;gt; element is a manifest that describes the various asserts the add-on provides and where they are located. Supported sub-elements are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;icon&amp;gt;&amp;lt;/code&amp;gt; See [[Add-on_structure#icon.png]]&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;fanart&amp;gt;&amp;lt;/code&amp;gt; See [[Add-on_structure#fanart.jpg]]&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;screenshot&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If some elements are empty or not specified, it will be treated as non-existing/not provided.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;assets&amp;gt;&lt;br /&gt;
    &amp;lt;icon&amp;gt;resources/icon.png&amp;lt;/icon&amp;gt;&lt;br /&gt;
    &amp;lt;fanart&amp;gt;resources/fanart.jpg&amp;lt;/fanart&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-01.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-02.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-03.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-04.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
&amp;lt;/assets&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the above example definition, the files must be placed in the &amp;lt;code&amp;gt;resources&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
== Skin specific elements ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
|  &#039;&#039;&#039;effectslowdown&#039;&#039;&#039;&lt;br /&gt;
|  A multiplier that is applied to all &amp;lt;animation&amp;gt; effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;debugging&#039;&#039;&#039;&lt;br /&gt;
|  When set to true, it&#039;ll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;res&#039;&#039;&#039;&lt;br /&gt;
|  Support for arbitrary skin resolutions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How window xml files are found ===&lt;br /&gt;
&lt;br /&gt;
Kodi can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain &amp;lt;width&amp;gt; and &amp;lt;height&amp;gt; tags. That way, Kodi can scale the controls to the new screen resolution.&lt;br /&gt;
&lt;br /&gt;
However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).&lt;br /&gt;
&lt;br /&gt;
The order that Kodi looks for it&#039;s skin files are as follows:&lt;br /&gt;
&lt;br /&gt;
# It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)&lt;br /&gt;
# If the current screenmode is 1080i and there&#039;s no 1080i folder, it then looks in the 720p folder.&lt;br /&gt;
# Finally, it looks in the &#039;&#039;&#039;res&#039;&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the &amp;lt;defaultresolution&amp;gt; folder, preventing needless repetition.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== addon.xml for skins ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
﻿&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
  id=&amp;quot;skin.confluence&amp;quot;&lt;br /&gt;
  version=&amp;quot;2.1.3&amp;quot;&lt;br /&gt;
  name=&amp;quot;Confluence&amp;quot;&lt;br /&gt;
  provider-name=&amp;quot;Jezz_X, Team Kodi&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.gui&amp;quot; version=&amp;quot;4.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension&lt;br /&gt;
    point=&amp;quot;xbmc.gui.skin&amp;quot;&lt;br /&gt;
    debugging=&amp;quot;false&amp;quot;&lt;br /&gt;
    effectslowdown=&amp;quot;0.75&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;res width=&amp;quot;1280&amp;quot; height=&amp;quot;720&amp;quot; aspect=&amp;quot;16:9&amp;quot; default=&amp;quot;true&amp;quot; folder=&amp;quot;720p&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Confluence skin by Jezz_X. (Kodi&#039;s default skin)&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi 9.11 and above. It is a combination of concepts from many popular skins, and attempts to embrace and integrate their good ideas into a skin that should be easy for first time Kodi users to understand and use.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi, removing it may cause issues&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
One thing to note is that &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;all tag names are lower case.&amp;lt;/font&amp;gt; XML tag names are case sensitive!&lt;br /&gt;
&lt;br /&gt;
== addon.xml for scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
    id=&amp;quot;script.artwork.downloader&amp;quot;&lt;br /&gt;
    name=&amp;quot;Artwork Downloader&amp;quot;&lt;br /&gt;
    version=&amp;quot;12.0.12&amp;quot;&lt;br /&gt;
    provider-name=&amp;quot;Martijn&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.json&amp;quot;                   version=&amp;quot;6.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.addon&amp;quot;                  version=&amp;quot;12.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot; optional=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.common.plugin.cache&amp;quot;  version=&amp;quot;1.3.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.script&amp;quot;         library=&amp;quot;default.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;executable&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Downloads Artwork for TV shows, Movies and Musicvideos in your library&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork[CR]Artwork sources:[CR]www.fanart.tv[CR]www.thetvdb.com[CR]www.themoviedb.org[CR]Remark:[CR]Check your skin to see what type of artwork is supported![CR]Each TV Show/Movie must have its own folder![CR]Skin integration:[CR]See readme file&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;For bugs, requests or general questions visit the Artwork Downloader thread on the Kodi forum.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Schema Definition =&lt;br /&gt;
&lt;br /&gt;
The XML schema definition for &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; is located [https://github.com/xbmc/xbmc/blob/master/addons/xbmc.addon/metadata.xsd here].&lt;br /&gt;
&lt;br /&gt;
{{frodo updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124003</id>
		<title>Addon.xml</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124003"/>
		<updated>2016-08-21T08:44:48Z</updated>

		<summary type="html">&lt;p&gt;Takoi: document &amp;lt;assets&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every skin, script, or plugin in Kodi contains an &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file which describes the add-on, providing credits, version information and dependencies. Below, we will explain how this file is structured and which elements must be used to create an add-on for Kodi. You can also consult the examples at the end to see how this file is laid out depending on if you are developing a skin or script.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file has the same basic structure, this example is for a video plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;plugin.addon.id&amp;quot; name=&amp;quot;Your Add-on&amp;quot; version=&amp;quot;1.2.3&amp;quot; provider-name=&amp;quot;You&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;video&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s summary&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s description&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en_gb&amp;quot;&amp;gt;&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few important things to note in the above sample:&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element must be present, and be the root node. It presents data about the add-on package as a whole.&lt;br /&gt;
* Inside the &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element is a &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element, listing all the dependencies that this add-on needs in order to function.&lt;br /&gt;
* Then there are one or more &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; elements, each of which describes a part of Kodi that the add-on extends.&lt;br /&gt;
* Finally, there is a specific &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element that extends &amp;lt;code&amp;gt;&amp;quot;xbmc.addon.metadata&amp;quot;&amp;lt;/code&amp;gt;. This describes the add-on to the user.&lt;br /&gt;
&lt;br /&gt;
= Elements =&lt;br /&gt;
 &lt;br /&gt;
== &amp;lt;addon&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element has 4 attributes, all required: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;provider-name&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;script.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;0.0.1&amp;quot; provider-name=&amp;quot;Dev1, Dev2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== id attribute ===&lt;br /&gt;
&lt;br /&gt;
The id attribute is the unique identifier used for this add-on.  It must be unique, and must use only lowercase characters, periods, underscores, dashes and numbers.  This identifier is also used as the name of the folder that contains the add-on, so for ease of searching, we suggest you use something like &amp;lt;type&amp;gt;.&amp;lt;uniquename&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The version attribute is used by Kodi to determine whether updates are available. This should be use a version scheme like &amp;lt;code&amp;gt;x.y.z&amp;lt;/code&amp;gt; (major.minor.patch). For example: &amp;lt;code&amp;gt;version=&amp;quot;0.0.1&amp;quot;&amp;lt;/code&amp;gt;. Generally, you&#039;ll start with a version of &amp;lt;code&amp;gt;0.y.z&amp;lt;/code&amp;gt; for test releases and once you feel it is ready for a full release, you&#039;d bump the version to &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== How versioning works ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.10&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.3.0&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta3&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta10&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Text should only be added for a beta version. In other cases version number should only contain numbers.}}&lt;br /&gt;
&lt;br /&gt;
=== name attribute ===&lt;br /&gt;
&lt;br /&gt;
The name attribute is the name of the add-on as it appears in the UI.  This should be in English where it makes sense for it to be so, and is not translatable.&lt;br /&gt;
&lt;br /&gt;
=== provider-name attribute ===&lt;br /&gt;
&lt;br /&gt;
The provider-name attribute is used as the author field.  This could be a team of authors or a single author. If the add-on is maintained by multiple people please separate them with a comma (&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;requires&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element contains one or more &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; elements which specify which other add-ons this particular add-on requires, and which version of those add-ons it requires. These add-ons may be part of Kodi itself, or may be parts of other third-party add-ons.&lt;br /&gt;
&lt;br /&gt;
Kodi will only allow the add-on to be run if suitable versions of the (non-optional) add-ons on which this add-on depends are installed. When a user installs your add-on from an online repository via Kodi&#039;s add-on manager, Kodi attempts to resolve these dependencies, and install anything that your add-on relies on first. The dependency must be provided with the minimum version number your script/skin requires.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here is a sample &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; block that imports two required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.14.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, which will only install on OpenELEC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;os.openelec.tv&amp;quot; version=&amp;quot;2.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;import&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element describes one dependency for an add-on, with two required attributes: &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;. There is also an optional attribute called, fittingly, &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If your add-on relies on other third-party add-ons, Kodi will automatically install them as well, provided they are available on an existing add-on repository. If they aren&#039;t available on any existing repository, the user must install the other add-ons themselves. Note that you need to include any Python libraries you need directly in your add-on; these can&#039;t be loaded with an &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element, since Kodi wouldn&#039;t know what to do with them.&lt;br /&gt;
&lt;br /&gt;
=== addon attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; attribute specifies the id of the required add-on, e.g. &amp;lt;code&amp;gt;script.module.elementtree&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; attribute specifies the minimum version of the required add-on to be installed.&lt;br /&gt;
&lt;br /&gt;
==== Dependency versions ====&lt;br /&gt;
&lt;br /&gt;
Each different Kodi version might require you to use a higher version of the &amp;lt;code&amp;gt;xbmc.*&amp;lt;/code&amp;gt; add-on dependencies to control on which version of Kodi the add-on can be installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Current versions&lt;br /&gt;
! Kodi version !! xbmc.python !! xbmc.gui !! xbmc.json !! xbmc.metadata !! xbmc.addon&lt;br /&gt;
|-&lt;br /&gt;
| Dharma 10.1 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 1.0 || 2.11 || 2.0|| 1.0 || 0.1&lt;br /&gt;
|-&lt;br /&gt;
| Eden 11.0 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt; || 2.0 || 3.0 || 4.0 || 1.0 || 11.0&lt;br /&gt;
|-&lt;br /&gt;
| Frodo 12.x &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 2.1.0 || 4.0.0 || 6.0.0 || 2.1.0 || 12.0.0&lt;br /&gt;
|-&lt;br /&gt;
| Gotham 13.x || 2.14.0 (ABI 2.1.0) || 5.0.1 || 6.6.0 (ABI 6.0.0) || 2.1.0 || 13.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Helix 14.x || 2.19.0 (ABI 2.1.0) || 5.3.0 || 6.20.0 (ABI 6.0.0) || 2.1.0 || 14.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Isengard 15.x || 2.20.0 (ABI 2.1.0) || 5.9.0 (ABI 5.3.0) || 6.25.1 (ABI 6.0.0) || 2.1.0 || 15.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Jarvis 16.x || 2.24.0 (ABI 2.1.0) || 5.10.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 16.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Krypton 17.x || 2.25.0 (ABI 2.1.0) || 5.11.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 17.0.0 (ABI 12.0.0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each Kodi version contain a certain backwards compatibility. For example add-ons made for Gotham 13.x can still work ion Jarvis 16.x. Do note that this might change in the future. The &#039;&#039;&#039;ABI&#039;&#039;&#039; version you see in the table above is the backwards compatibility version for which add-ons are still marked &amp;quot;working&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== optional attribute ===&lt;br /&gt;
&lt;br /&gt;
The dependency may be made optional by setting the &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt; attribute to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. This will only install the dependency when the add-on actually needs it. Even if this dependency is missing, the add-on can still be installed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;extension&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element describes the technical aspects of this add-on. It will have at least a point attribute which will give the part of Kodi that the add-on extends. For instance, the &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file for the Confluence skin extends the &amp;lt;code&amp;gt;xbmc.gui.skin&amp;lt;/code&amp;gt; part of xbmc. All available extension points are given below.&lt;br /&gt;
&lt;br /&gt;
The various extension points that Kodi provides are given in the list below.&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Extension point&lt;br /&gt;
!Add-on Category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Skinning|xbmc.gui.skin]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Skin&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.webinterface&amp;lt;/code&amp;gt;&lt;br /&gt;
|Web interface&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Add-on repositories|xbmc.addon.repository]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[HOW-TO:_Automatically_start_addons_using_services|xbmc.service]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Services&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.albums&amp;lt;/code&amp;gt;&lt;br /&gt;
|Album information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.artists&amp;lt;/code&amp;gt;&lt;br /&gt;
|Artist information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.movies&amp;lt;/code&amp;gt;&lt;br /&gt;
|Movie information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.musicvideos&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music video information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.tvshows&amp;lt;/code&amp;gt;&lt;br /&gt;
|TV information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.library&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.ui.screensaver&amp;lt;/code&amp;gt;&lt;br /&gt;
|Screensaver&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.player.musicviz&amp;lt;/code&amp;gt;&lt;br /&gt;
|Visualization&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Plugin sources#What Kodi requires for your add-on|xbmc.python.pluginsource]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script sources#What Kodi requires for your add-on|xbmc.python.script]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|Weather&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.subtitle.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|Subtitle service module&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script lyrics#What Kodi requires for your add-on|xbmc.python.lyrics]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Lyrics&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script library#What Kodi requires for your add-on|xbmc.python.library]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|These don&#039;t show up in the addon browser and are purely as support for other scripts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Picture Add-ons (image)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.images&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional image files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.language&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional language files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add-ons that don&#039;t correspond to a specific add-on category can not be installed by users. These are usually supporting or shared add-ons that are installed automatically by the add-ons that require them.&lt;br /&gt;
&lt;br /&gt;
=== xbmc.python.pluginsource ===&lt;br /&gt;
{{See also|Plugin sources}}&lt;br /&gt;
&lt;br /&gt;
The most common extension point that will be used by plugin addon developers is &amp;lt;code&amp;gt;xbmc.python.pluginsource&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== library attribute ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; element has an extra attribute: &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt;. This is the name of the Python script (startup script) that will be run when the add-on is activated. This file must exist in the root of your add-on directory.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;provides&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
The extension has an additional child element named &amp;lt;code&amp;gt;&amp;lt;provides&amp;gt;&amp;lt;/code&amp;gt;, which contains a whitespace separated list of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;, and/or &amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;. This determines in what area (or context) of the Kodi system your addon will make itself visible in (please note that this applies only to plugin extension points):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Provides&lt;br /&gt;
!Appears in&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Pictures&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|Programs&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|Not visible&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;gpodderxbmc.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;provides&amp;gt;audio video&amp;lt;/provides&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xbmc.addon.metadata ===&lt;br /&gt;
&lt;br /&gt;
This special extension point &#039;&#039;must&#039;&#039; be provided by all add-ons, and is the way that your add-on is described to users of the Kodi add-on manager.&lt;br /&gt;
&lt;br /&gt;
==== Required elements ====&lt;br /&gt;
&lt;br /&gt;
There are several elements that this should contain and all are compulsory (except the broken tag). Each of the elements below must always be present in English as a minimum.&lt;br /&gt;
&lt;br /&gt;
Many of these elements can be translated into multiple languages and should be added once for each supported language. See the [[List of language codes (ISO-639:1988)]] for possible language strings. If there&#039;s no &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute for a translatable element, it defaults to English. However, even for English, adding the &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute is recommended.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;summary&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;summary&amp;gt;&amp;lt;/code&amp;gt; elements provide a short summary of what the add-on does. This should be a single sentence. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Kodi v15 uses [https://en.wikipedia.org/wiki/Locale_(computer_software) locale identifiers] for the lang attribute, v14 and older uses ISO 639-1.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;description&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;description&amp;gt;&amp;lt;/code&amp;gt; elements provide a more detailed summary of what the add-on does. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;disclaimer&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;disclaimer&amp;gt;&amp;lt;/code&amp;gt; elements that indicate what (if any) things the user should know about the add-on. There is no need to have a disclaimer if you don&#039;t want one, though if something requires settings, or only works in a particular country then you may want to state this here. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en_GB&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;news&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|Used in Kodi v17 Krypton and later only. Older versions are forward compatible.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;news&amp;gt;&amp;lt;/code&amp;gt; element should contains a simple description of the major changes made to the add-on (new functionality, big fixes, etc). This is displayed in the Kodi addon installation/update system. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;news&amp;gt;v0.1.2  (2014-1-15)&lt;br /&gt;
- Added notification for Ubuntu users checking through apt command&amp;lt;/news&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;platform&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;platform&amp;gt;&amp;lt;/code&amp;gt; tag specifies which platforms (operating systems, hardware) this add-on runs on. Many add-ons will run on all platforms, so &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; is an option. If the platform tag is missing, we assume the add-on runs on all platforms. A combination of these is also possible. Currently available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;linux&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx64&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ios&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;windx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;android&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;language&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;language&amp;gt;&amp;lt;/code&amp;gt; elements indicate the language(s) of the &#039;&#039;content&#039;&#039; provided by your add-on. It applies to plugins, scripts, scrapers etc. This allows browsing the add-on list by language. When there is no specific language provided in your content, leave it blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;language&amp;gt;en de fr&amp;lt;/language&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;license&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;license&amp;gt;&amp;lt;/code&amp;gt; element indicates what license is used for this add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;forum&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;forum&amp;gt;&amp;lt;/code&amp;gt; element provides the forum thread URL for this specific add-on. Leave this blank if there is no forum thread.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;forum&amp;gt;http://www.myaddonwebsite.com/forum.php?thread=12345&amp;lt;/forum&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;website&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;website&amp;gt;&amp;lt;/code&amp;gt; element provides the website URL for this specific add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;website&amp;gt;http://www.myaddonwebsite.com/&amp;lt;/website&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element provides the URL for the source code for this specific add-on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source&amp;gt;http://github.com/someone/myaddon&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;email&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/code&amp;gt; element provides the email address of the author if he wishes to do so for this specific add-on. Here are two examples of how you can make it look (the second one it harder for spambots to use). This can be left blank if you do not want to make your email address public.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;email&amp;gt;foo@bar.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;email&amp;gt;foo at bar dot com&amp;lt;/email&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;broken&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;broken&amp;gt;&amp;lt;/code&amp;gt; tag will mark the add-on as broken in the Kodi repo and provide the reason why. You don&#039;t need to do a version bump for this to work. However a bump is recommended as you could also add this to the changelog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;broken&amp;gt;deprecated&amp;lt;/broken&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;assets&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|Kodi v17 Krypton and later.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;assets&amp;gt;&amp;lt;/code&amp;gt; element is a manifest that describes the various asserts the add-on provides and where they are located. Supported sub-elements are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;icon&amp;gt;&amp;lt;/code&amp;gt; See [[Add-on_structure#icon.png]]&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;fanart&amp;gt;&amp;lt;/code&amp;gt; See [[Add-on_structure#fanart.jpg]]&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;screenshot&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If some elements are empty or not specified, it will be treated as non-existing/not provided.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;assets&amp;gt;&lt;br /&gt;
    &amp;lt;icon&amp;gt;resources/icon.png&amp;lt;/icon&amp;gt;&lt;br /&gt;
    &amp;lt;fanart&amp;gt;resources/fanart.jpg&amp;lt;/fanart&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-01.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-02.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-03.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
    &amp;lt;screenshot&amp;gt;resources/screenshot-04.jpg&amp;lt;/screenshot&amp;gt;&lt;br /&gt;
&amp;lt;/assets&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the above example definition, the files must be placed in the &amp;lt;code&amp;gt;resources&amp;lt;/code&amp;gt; folder.&lt;br /&gt;
&lt;br /&gt;
== Skin specific elements ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
|  &#039;&#039;&#039;effectslowdown&#039;&#039;&#039;&lt;br /&gt;
|  A multiplier that is applied to all &amp;lt;animation&amp;gt; effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;debugging&#039;&#039;&#039;&lt;br /&gt;
|  When set to true, it&#039;ll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;res&#039;&#039;&#039;&lt;br /&gt;
|  Support for arbitrary skin resolutions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How window xml files are found ===&lt;br /&gt;
&lt;br /&gt;
Kodi can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain &amp;lt;width&amp;gt; and &amp;lt;height&amp;gt; tags. That way, Kodi can scale the controls to the new screen resolution.&lt;br /&gt;
&lt;br /&gt;
However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).&lt;br /&gt;
&lt;br /&gt;
The order that Kodi looks for it&#039;s skin files are as follows:&lt;br /&gt;
&lt;br /&gt;
# It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)&lt;br /&gt;
# If the current screenmode is 1080i and there&#039;s no 1080i folder, it then looks in the 720p folder.&lt;br /&gt;
# Finally, it looks in the &#039;&#039;&#039;res&#039;&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the &amp;lt;defaultresolution&amp;gt; folder, preventing needless repetition.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== addon.xml for skins ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
﻿&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
  id=&amp;quot;skin.confluence&amp;quot;&lt;br /&gt;
  version=&amp;quot;2.1.3&amp;quot;&lt;br /&gt;
  name=&amp;quot;Confluence&amp;quot;&lt;br /&gt;
  provider-name=&amp;quot;Jezz_X, Team Kodi&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.gui&amp;quot; version=&amp;quot;4.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension&lt;br /&gt;
    point=&amp;quot;xbmc.gui.skin&amp;quot;&lt;br /&gt;
    debugging=&amp;quot;false&amp;quot;&lt;br /&gt;
    effectslowdown=&amp;quot;0.75&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;res width=&amp;quot;1280&amp;quot; height=&amp;quot;720&amp;quot; aspect=&amp;quot;16:9&amp;quot; default=&amp;quot;true&amp;quot; folder=&amp;quot;720p&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Confluence skin by Jezz_X. (Kodi&#039;s default skin)&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi 9.11 and above. It is a combination of concepts from many popular skins, and attempts to embrace and integrate their good ideas into a skin that should be easy for first time Kodi users to understand and use.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi, removing it may cause issues&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
One thing to note is that &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;all tag names are lower case.&amp;lt;/font&amp;gt; XML tag names are case sensitive!&lt;br /&gt;
&lt;br /&gt;
== addon.xml for scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
    id=&amp;quot;script.artwork.downloader&amp;quot;&lt;br /&gt;
    name=&amp;quot;Artwork Downloader&amp;quot;&lt;br /&gt;
    version=&amp;quot;12.0.12&amp;quot;&lt;br /&gt;
    provider-name=&amp;quot;Martijn&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.json&amp;quot;                   version=&amp;quot;6.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.addon&amp;quot;                  version=&amp;quot;12.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot; optional=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.common.plugin.cache&amp;quot;  version=&amp;quot;1.3.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.script&amp;quot;         library=&amp;quot;default.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;executable&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Downloads Artwork for TV shows, Movies and Musicvideos in your library&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork[CR]Artwork sources:[CR]www.fanart.tv[CR]www.thetvdb.com[CR]www.themoviedb.org[CR]Remark:[CR]Check your skin to see what type of artwork is supported![CR]Each TV Show/Movie must have its own folder![CR]Skin integration:[CR]See readme file&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;For bugs, requests or general questions visit the Artwork Downloader thread on the Kodi forum.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Schema Definition =&lt;br /&gt;
&lt;br /&gt;
The XML schema definition for &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; is located [https://github.com/xbmc/xbmc/blob/master/addons/xbmc.addon/metadata.xsd here].&lt;br /&gt;
&lt;br /&gt;
{{frodo updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124002</id>
		<title>Addon.xml</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124002"/>
		<updated>2016-08-21T08:20:56Z</updated>

		<summary type="html">&lt;p&gt;Takoi: add note about forward compatibility&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every skin, script, or plugin in Kodi contains an &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file which describes the add-on, providing credits, version information and dependencies. Below, we will explain how this file is structured and which elements must be used to create an add-on for Kodi. You can also consult the examples at the end to see how this file is laid out depending on if you are developing a skin or script.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file has the same basic structure, this example is for a video plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;plugin.addon.id&amp;quot; name=&amp;quot;Your Add-on&amp;quot; version=&amp;quot;1.2.3&amp;quot; provider-name=&amp;quot;You&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;video&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s summary&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s description&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en_gb&amp;quot;&amp;gt;&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few important things to note in the above sample:&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element must be present, and be the root node. It presents data about the add-on package as a whole.&lt;br /&gt;
* Inside the &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element is a &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element, listing all the dependencies that this add-on needs in order to function.&lt;br /&gt;
* Then there are one or more &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; elements, each of which describes a part of Kodi that the add-on extends.&lt;br /&gt;
* Finally, there is a specific &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element that extends &amp;lt;code&amp;gt;&amp;quot;xbmc.addon.metadata&amp;quot;&amp;lt;/code&amp;gt;. This describes the add-on to the user.&lt;br /&gt;
&lt;br /&gt;
= Elements =&lt;br /&gt;
 &lt;br /&gt;
== &amp;lt;addon&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element has 4 attributes, all required: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;provider-name&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;script.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;0.0.1&amp;quot; provider-name=&amp;quot;Dev1, Dev2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== id attribute ===&lt;br /&gt;
&lt;br /&gt;
The id attribute is the unique identifier used for this add-on.  It must be unique, and must use only lowercase characters, periods, underscores, dashes and numbers.  This identifier is also used as the name of the folder that contains the add-on, so for ease of searching, we suggest you use something like &amp;lt;type&amp;gt;.&amp;lt;uniquename&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The version attribute is used by Kodi to determine whether updates are available. This should be use a version scheme like &amp;lt;code&amp;gt;x.y.z&amp;lt;/code&amp;gt; (major.minor.patch). For example: &amp;lt;code&amp;gt;version=&amp;quot;0.0.1&amp;quot;&amp;lt;/code&amp;gt;. Generally, you&#039;ll start with a version of &amp;lt;code&amp;gt;0.y.z&amp;lt;/code&amp;gt; for test releases and once you feel it is ready for a full release, you&#039;d bump the version to &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== How versioning works ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.10&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.3.0&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta3&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta10&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Text should only be added for a beta version. In other cases version number should only contain numbers.}}&lt;br /&gt;
&lt;br /&gt;
=== name attribute ===&lt;br /&gt;
&lt;br /&gt;
The name attribute is the name of the add-on as it appears in the UI.  This should be in English where it makes sense for it to be so, and is not translatable.&lt;br /&gt;
&lt;br /&gt;
=== provider-name attribute ===&lt;br /&gt;
&lt;br /&gt;
The provider-name attribute is used as the author field.  This could be a team of authors or a single author. If the add-on is maintained by multiple people please separate them with a comma (&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;requires&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element contains one or more &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; elements which specify which other add-ons this particular add-on requires, and which version of those add-ons it requires. These add-ons may be part of Kodi itself, or may be parts of other third-party add-ons.&lt;br /&gt;
&lt;br /&gt;
Kodi will only allow the add-on to be run if suitable versions of the (non-optional) add-ons on which this add-on depends are installed. When a user installs your add-on from an online repository via Kodi&#039;s add-on manager, Kodi attempts to resolve these dependencies, and install anything that your add-on relies on first. The dependency must be provided with the minimum version number your script/skin requires.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here is a sample &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; block that imports two required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.14.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, which will only install on OpenELEC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;os.openelec.tv&amp;quot; version=&amp;quot;2.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;import&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element describes one dependency for an add-on, with two required attributes: &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;. There is also an optional attribute called, fittingly, &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If your add-on relies on other third-party add-ons, Kodi will automatically install them as well, provided they are available on an existing add-on repository. If they aren&#039;t available on any existing repository, the user must install the other add-ons themselves. Note that you need to include any Python libraries you need directly in your add-on; these can&#039;t be loaded with an &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element, since Kodi wouldn&#039;t know what to do with them.&lt;br /&gt;
&lt;br /&gt;
=== addon attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; attribute specifies the id of the required add-on, e.g. &amp;lt;code&amp;gt;script.module.elementtree&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; attribute specifies the minimum version of the required add-on to be installed.&lt;br /&gt;
&lt;br /&gt;
==== Dependency versions ====&lt;br /&gt;
&lt;br /&gt;
Each different Kodi version might require you to use a higher version of the &amp;lt;code&amp;gt;xbmc.*&amp;lt;/code&amp;gt; add-on dependencies to control on which version of Kodi the add-on can be installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Current versions&lt;br /&gt;
! Kodi version !! xbmc.python !! xbmc.gui !! xbmc.json !! xbmc.metadata !! xbmc.addon&lt;br /&gt;
|-&lt;br /&gt;
| Dharma 10.1 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 1.0 || 2.11 || 2.0|| 1.0 || 0.1&lt;br /&gt;
|-&lt;br /&gt;
| Eden 11.0 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt; || 2.0 || 3.0 || 4.0 || 1.0 || 11.0&lt;br /&gt;
|-&lt;br /&gt;
| Frodo 12.x &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 2.1.0 || 4.0.0 || 6.0.0 || 2.1.0 || 12.0.0&lt;br /&gt;
|-&lt;br /&gt;
| Gotham 13.x || 2.14.0 (ABI 2.1.0) || 5.0.1 || 6.6.0 (ABI 6.0.0) || 2.1.0 || 13.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Helix 14.x || 2.19.0 (ABI 2.1.0) || 5.3.0 || 6.20.0 (ABI 6.0.0) || 2.1.0 || 14.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Isengard 15.x || 2.20.0 (ABI 2.1.0) || 5.9.0 (ABI 5.3.0) || 6.25.1 (ABI 6.0.0) || 2.1.0 || 15.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Jarvis 16.x || 2.24.0 (ABI 2.1.0) || 5.10.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 16.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Krypton 17.x || 2.25.0 (ABI 2.1.0) || 5.11.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 17.0.0 (ABI 12.0.0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each Kodi version contain a certain backwards compatibility. For example add-ons made for Gotham 13.x can still work ion Jarvis 16.x. Do note that this might change in the future. The &#039;&#039;&#039;ABI&#039;&#039;&#039; version you see in the table above is the backwards compatibility version for which add-ons are still marked &amp;quot;working&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== optional attribute ===&lt;br /&gt;
&lt;br /&gt;
The dependency may be made optional by setting the &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt; attribute to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. This will only install the dependency when the add-on actually needs it. Even if this dependency is missing, the add-on can still be installed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;extension&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element describes the technical aspects of this add-on. It will have at least a point attribute which will give the part of Kodi that the add-on extends. For instance, the &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file for the Confluence skin extends the &amp;lt;code&amp;gt;xbmc.gui.skin&amp;lt;/code&amp;gt; part of xbmc. All available extension points are given below.&lt;br /&gt;
&lt;br /&gt;
The various extension points that Kodi provides are given in the list below.&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Extension point&lt;br /&gt;
!Add-on Category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Skinning|xbmc.gui.skin]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Skin&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.webinterface&amp;lt;/code&amp;gt;&lt;br /&gt;
|Web interface&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Add-on repositories|xbmc.addon.repository]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[HOW-TO:_Automatically_start_addons_using_services|xbmc.service]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Services&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.albums&amp;lt;/code&amp;gt;&lt;br /&gt;
|Album information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.artists&amp;lt;/code&amp;gt;&lt;br /&gt;
|Artist information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.movies&amp;lt;/code&amp;gt;&lt;br /&gt;
|Movie information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.musicvideos&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music video information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.tvshows&amp;lt;/code&amp;gt;&lt;br /&gt;
|TV information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.library&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.ui.screensaver&amp;lt;/code&amp;gt;&lt;br /&gt;
|Screensaver&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.player.musicviz&amp;lt;/code&amp;gt;&lt;br /&gt;
|Visualization&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Plugin sources#What Kodi requires for your add-on|xbmc.python.pluginsource]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script sources#What Kodi requires for your add-on|xbmc.python.script]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|Weather&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.subtitle.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|Subtitle service module&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script lyrics#What Kodi requires for your add-on|xbmc.python.lyrics]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Lyrics&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script library#What Kodi requires for your add-on|xbmc.python.library]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|These don&#039;t show up in the addon browser and are purely as support for other scripts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Picture Add-ons (image)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.images&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional image files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.language&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional language files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add-ons that don&#039;t correspond to a specific add-on category can not be installed by users. These are usually supporting or shared add-ons that are installed automatically by the add-ons that require them.&lt;br /&gt;
&lt;br /&gt;
=== xbmc.python.pluginsource ===&lt;br /&gt;
{{See also|Plugin sources}}&lt;br /&gt;
&lt;br /&gt;
The most common extension point that will be used by plugin addon developers is &amp;lt;code&amp;gt;xbmc.python.pluginsource&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== library attribute ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; element has an extra attribute: &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt;. This is the name of the Python script (startup script) that will be run when the add-on is activated. This file must exist in the root of your add-on directory.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;provides&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
The extension has an additional child element named &amp;lt;code&amp;gt;&amp;lt;provides&amp;gt;&amp;lt;/code&amp;gt;, which contains a whitespace separated list of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;, and/or &amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;. This determines in what area (or context) of the Kodi system your addon will make itself visible in (please note that this applies only to plugin extension points):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Provides&lt;br /&gt;
!Appears in&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Pictures&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|Programs&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|Not visible&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;gpodderxbmc.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;provides&amp;gt;audio video&amp;lt;/provides&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xbmc.addon.metadata ===&lt;br /&gt;
&lt;br /&gt;
This special extension point &#039;&#039;must&#039;&#039; be provided by all add-ons, and is the way that your add-on is described to users of the Kodi add-on manager.&lt;br /&gt;
&lt;br /&gt;
==== Required elements ====&lt;br /&gt;
&lt;br /&gt;
There are several elements that this should contain and all are compulsory (except the broken tag). Each of the elements below must always be present in English as a minimum.&lt;br /&gt;
&lt;br /&gt;
Many of these elements can be translated into multiple languages and should be added once for each supported language. See the [[List of language codes (ISO-639:1988)]] for possible language strings. If there&#039;s no &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute for a translatable element, it defaults to English. However, even for English, adding the &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute is recommended.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;summary&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;summary&amp;gt;&amp;lt;/code&amp;gt; elements provide a short summary of what the add-on does. This should be a single sentence. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Kodi v15 uses [https://en.wikipedia.org/wiki/Locale_(computer_software) locale identifiers] for the lang attribute, v14 and older uses ISO 639-1.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;description&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;description&amp;gt;&amp;lt;/code&amp;gt; elements provide a more detailed summary of what the add-on does. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;disclaimer&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;disclaimer&amp;gt;&amp;lt;/code&amp;gt; elements that indicate what (if any) things the user should know about the add-on. There is no need to have a disclaimer if you don&#039;t want one, though if something requires settings, or only works in a particular country then you may want to state this here. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en_GB&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;news&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|Used in Kodi v17 Krypton and later only. Older versions are forward compatible.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;news&amp;gt;&amp;lt;/code&amp;gt; element should contains a simple description of the major changes made to the add-on (new functionality, big fixes, etc). This is displayed in the Kodi addon installation/update system. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;news&amp;gt;v0.1.2  (2014-1-15)&lt;br /&gt;
- Added notification for Ubuntu users checking through apt command&amp;lt;/news&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;platform&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;platform&amp;gt;&amp;lt;/code&amp;gt; tag specifies which platforms (operating systems, hardware) this add-on runs on. Many add-ons will run on all platforms, so &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; is an option. If the platform tag is missing, we assume the add-on runs on all platforms. A combination of these is also possible. Currently available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;linux&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx64&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ios&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;windx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;android&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;language&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;language&amp;gt;&amp;lt;/code&amp;gt; elements indicate the language(s) of the &#039;&#039;content&#039;&#039; provided by your add-on. It applies to plugins, scripts, scrapers etc. This allows browsing the add-on list by language. When there is no specific language provided in your content, leave it blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;language&amp;gt;en de fr&amp;lt;/language&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;license&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;license&amp;gt;&amp;lt;/code&amp;gt; element indicates what license is used for this add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;forum&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;forum&amp;gt;&amp;lt;/code&amp;gt; element provides the forum thread URL for this specific add-on. Leave this blank if there is no forum thread.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;forum&amp;gt;http://www.myaddonwebsite.com/forum.php?thread=12345&amp;lt;/forum&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;website&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;website&amp;gt;&amp;lt;/code&amp;gt; element provides the website URL for this specific add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;website&amp;gt;http://www.myaddonwebsite.com/&amp;lt;/website&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element provides the URL for the source code for this specific add-on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source&amp;gt;http://github.com/someone/myaddon&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;email&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/code&amp;gt; element provides the email address of the author if he wishes to do so for this specific add-on. Here are two examples of how you can make it look (the second one it harder for spambots to use). This can be left blank if you do not want to make your email address public.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;email&amp;gt;foo@bar.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;email&amp;gt;foo at bar dot com&amp;lt;/email&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;broken&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;broken&amp;gt;&amp;lt;/code&amp;gt; tag will mark the add-on as broken in the Kodi repo and provide the reason why. You don&#039;t need to do a version bump for this to work. However a bump is recommended as you could also add this to the changelog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;broken&amp;gt;deprecated&amp;lt;/broken&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skin specific elements ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
|  &#039;&#039;&#039;effectslowdown&#039;&#039;&#039;&lt;br /&gt;
|  A multiplier that is applied to all &amp;lt;animation&amp;gt; effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;debugging&#039;&#039;&#039;&lt;br /&gt;
|  When set to true, it&#039;ll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;res&#039;&#039;&#039;&lt;br /&gt;
|  Support for arbitrary skin resolutions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How window xml files are found ===&lt;br /&gt;
&lt;br /&gt;
Kodi can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain &amp;lt;width&amp;gt; and &amp;lt;height&amp;gt; tags. That way, Kodi can scale the controls to the new screen resolution.&lt;br /&gt;
&lt;br /&gt;
However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).&lt;br /&gt;
&lt;br /&gt;
The order that Kodi looks for it&#039;s skin files are as follows:&lt;br /&gt;
&lt;br /&gt;
# It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)&lt;br /&gt;
# If the current screenmode is 1080i and there&#039;s no 1080i folder, it then looks in the 720p folder.&lt;br /&gt;
# Finally, it looks in the &#039;&#039;&#039;res&#039;&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the &amp;lt;defaultresolution&amp;gt; folder, preventing needless repetition.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== addon.xml for skins ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
﻿&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
  id=&amp;quot;skin.confluence&amp;quot;&lt;br /&gt;
  version=&amp;quot;2.1.3&amp;quot;&lt;br /&gt;
  name=&amp;quot;Confluence&amp;quot;&lt;br /&gt;
  provider-name=&amp;quot;Jezz_X, Team Kodi&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.gui&amp;quot; version=&amp;quot;4.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension&lt;br /&gt;
    point=&amp;quot;xbmc.gui.skin&amp;quot;&lt;br /&gt;
    debugging=&amp;quot;false&amp;quot;&lt;br /&gt;
    effectslowdown=&amp;quot;0.75&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;res width=&amp;quot;1280&amp;quot; height=&amp;quot;720&amp;quot; aspect=&amp;quot;16:9&amp;quot; default=&amp;quot;true&amp;quot; folder=&amp;quot;720p&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Confluence skin by Jezz_X. (Kodi&#039;s default skin)&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi 9.11 and above. It is a combination of concepts from many popular skins, and attempts to embrace and integrate their good ideas into a skin that should be easy for first time Kodi users to understand and use.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi, removing it may cause issues&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
One thing to note is that &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;all tag names are lower case.&amp;lt;/font&amp;gt; XML tag names are case sensitive!&lt;br /&gt;
&lt;br /&gt;
== addon.xml for scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
    id=&amp;quot;script.artwork.downloader&amp;quot;&lt;br /&gt;
    name=&amp;quot;Artwork Downloader&amp;quot;&lt;br /&gt;
    version=&amp;quot;12.0.12&amp;quot;&lt;br /&gt;
    provider-name=&amp;quot;Martijn&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.json&amp;quot;                   version=&amp;quot;6.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.addon&amp;quot;                  version=&amp;quot;12.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot; optional=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.common.plugin.cache&amp;quot;  version=&amp;quot;1.3.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.script&amp;quot;         library=&amp;quot;default.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;executable&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Downloads Artwork for TV shows, Movies and Musicvideos in your library&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork[CR]Artwork sources:[CR]www.fanart.tv[CR]www.thetvdb.com[CR]www.themoviedb.org[CR]Remark:[CR]Check your skin to see what type of artwork is supported![CR]Each TV Show/Movie must have its own folder![CR]Skin integration:[CR]See readme file&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;For bugs, requests or general questions visit the Artwork Downloader thread on the Kodi forum.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Schema Definition =&lt;br /&gt;
&lt;br /&gt;
The XML schema definition for &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; is located [https://github.com/xbmc/xbmc/blob/master/addons/xbmc.addon/metadata.xsd here].&lt;br /&gt;
&lt;br /&gt;
{{frodo updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124001</id>
		<title>Addon.xml</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Addon.xml&amp;diff=124001"/>
		<updated>2016-08-21T08:19:28Z</updated>

		<summary type="html">&lt;p&gt;Takoi: remove old stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every skin, script, or plugin in Kodi contains an &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file which describes the add-on, providing credits, version information and dependencies. Below, we will explain how this file is structured and which elements must be used to create an add-on for Kodi. You can also consult the examples at the end to see how this file is laid out depending on if you are developing a skin or script.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file has the same basic structure, this example is for a video plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;plugin.addon.id&amp;quot; name=&amp;quot;Your Add-on&amp;quot; version=&amp;quot;1.2.3&amp;quot; provider-name=&amp;quot;You&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;video&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s summary&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s description&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en_gb&amp;quot;&amp;gt;&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few important things to note in the above sample:&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element must be present, and be the root node. It presents data about the add-on package as a whole.&lt;br /&gt;
* Inside the &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element is a &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element, listing all the dependencies that this add-on needs in order to function.&lt;br /&gt;
* Then there are one or more &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; elements, each of which describes a part of Kodi that the add-on extends.&lt;br /&gt;
* Finally, there is a specific &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element that extends &amp;lt;code&amp;gt;&amp;quot;xbmc.addon.metadata&amp;quot;&amp;lt;/code&amp;gt;. This describes the add-on to the user.&lt;br /&gt;
&lt;br /&gt;
= Elements =&lt;br /&gt;
 &lt;br /&gt;
== &amp;lt;addon&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element has 4 attributes, all required: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;provider-name&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;script.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;0.0.1&amp;quot; provider-name=&amp;quot;Dev1, Dev2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== id attribute ===&lt;br /&gt;
&lt;br /&gt;
The id attribute is the unique identifier used for this add-on.  It must be unique, and must use only lowercase characters, periods, underscores, dashes and numbers.  This identifier is also used as the name of the folder that contains the add-on, so for ease of searching, we suggest you use something like &amp;lt;type&amp;gt;.&amp;lt;uniquename&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The version attribute is used by Kodi to determine whether updates are available. This should be use a version scheme like &amp;lt;code&amp;gt;x.y.z&amp;lt;/code&amp;gt; (major.minor.patch). For example: &amp;lt;code&amp;gt;version=&amp;quot;0.0.1&amp;quot;&amp;lt;/code&amp;gt;. Generally, you&#039;ll start with a version of &amp;lt;code&amp;gt;0.y.z&amp;lt;/code&amp;gt; for test releases and once you feel it is ready for a full release, you&#039;d bump the version to &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== How versioning works ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.10&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.3.0&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta3&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta10&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Text should only be added for a beta version. In other cases version number should only contain numbers.}}&lt;br /&gt;
&lt;br /&gt;
=== name attribute ===&lt;br /&gt;
&lt;br /&gt;
The name attribute is the name of the add-on as it appears in the UI.  This should be in English where it makes sense for it to be so, and is not translatable.&lt;br /&gt;
&lt;br /&gt;
=== provider-name attribute ===&lt;br /&gt;
&lt;br /&gt;
The provider-name attribute is used as the author field.  This could be a team of authors or a single author. If the add-on is maintained by multiple people please separate them with a comma (&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;requires&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element contains one or more &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; elements which specify which other add-ons this particular add-on requires, and which version of those add-ons it requires. These add-ons may be part of Kodi itself, or may be parts of other third-party add-ons.&lt;br /&gt;
&lt;br /&gt;
Kodi will only allow the add-on to be run if suitable versions of the (non-optional) add-ons on which this add-on depends are installed. When a user installs your add-on from an online repository via Kodi&#039;s add-on manager, Kodi attempts to resolve these dependencies, and install anything that your add-on relies on first. The dependency must be provided with the minimum version number your script/skin requires.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here is a sample &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; block that imports two required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.14.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, which will only install on OpenELEC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;os.openelec.tv&amp;quot; version=&amp;quot;2.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;import&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element describes one dependency for an add-on, with two required attributes: &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;. There is also an optional attribute called, fittingly, &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If your add-on relies on other third-party add-ons, Kodi will automatically install them as well, provided they are available on an existing add-on repository. If they aren&#039;t available on any existing repository, the user must install the other add-ons themselves. Note that you need to include any Python libraries you need directly in your add-on; these can&#039;t be loaded with an &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element, since Kodi wouldn&#039;t know what to do with them.&lt;br /&gt;
&lt;br /&gt;
=== addon attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; attribute specifies the id of the required add-on, e.g. &amp;lt;code&amp;gt;script.module.elementtree&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; attribute specifies the minimum version of the required add-on to be installed.&lt;br /&gt;
&lt;br /&gt;
==== Dependency versions ====&lt;br /&gt;
&lt;br /&gt;
Each different Kodi version might require you to use a higher version of the &amp;lt;code&amp;gt;xbmc.*&amp;lt;/code&amp;gt; add-on dependencies to control on which version of Kodi the add-on can be installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Current versions&lt;br /&gt;
! Kodi version !! xbmc.python !! xbmc.gui !! xbmc.json !! xbmc.metadata !! xbmc.addon&lt;br /&gt;
|-&lt;br /&gt;
| Dharma 10.1 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 1.0 || 2.11 || 2.0|| 1.0 || 0.1&lt;br /&gt;
|-&lt;br /&gt;
| Eden 11.0 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt; || 2.0 || 3.0 || 4.0 || 1.0 || 11.0&lt;br /&gt;
|-&lt;br /&gt;
| Frodo 12.x &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 2.1.0 || 4.0.0 || 6.0.0 || 2.1.0 || 12.0.0&lt;br /&gt;
|-&lt;br /&gt;
| Gotham 13.x || 2.14.0 (ABI 2.1.0) || 5.0.1 || 6.6.0 (ABI 6.0.0) || 2.1.0 || 13.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Helix 14.x || 2.19.0 (ABI 2.1.0) || 5.3.0 || 6.20.0 (ABI 6.0.0) || 2.1.0 || 14.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Isengard 15.x || 2.20.0 (ABI 2.1.0) || 5.9.0 (ABI 5.3.0) || 6.25.1 (ABI 6.0.0) || 2.1.0 || 15.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Jarvis 16.x || 2.24.0 (ABI 2.1.0) || 5.10.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 16.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Krypton 17.x || 2.25.0 (ABI 2.1.0) || 5.11.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 17.0.0 (ABI 12.0.0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each Kodi version contain a certain backwards compatibility. For example add-ons made for Gotham 13.x can still work ion Jarvis 16.x. Do note that this might change in the future. The &#039;&#039;&#039;ABI&#039;&#039;&#039; version you see in the table above is the backwards compatibility version for which add-ons are still marked &amp;quot;working&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== optional attribute ===&lt;br /&gt;
&lt;br /&gt;
The dependency may be made optional by setting the &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt; attribute to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. This will only install the dependency when the add-on actually needs it. Even if this dependency is missing, the add-on can still be installed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;extension&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element describes the technical aspects of this add-on. It will have at least a point attribute which will give the part of Kodi that the add-on extends. For instance, the &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file for the Confluence skin extends the &amp;lt;code&amp;gt;xbmc.gui.skin&amp;lt;/code&amp;gt; part of xbmc. All available extension points are given below.&lt;br /&gt;
&lt;br /&gt;
The various extension points that Kodi provides are given in the list below.&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Extension point&lt;br /&gt;
!Add-on Category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Skinning|xbmc.gui.skin]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Skin&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.webinterface&amp;lt;/code&amp;gt;&lt;br /&gt;
|Web interface&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Add-on repositories|xbmc.addon.repository]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[HOW-TO:_Automatically_start_addons_using_services|xbmc.service]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Services&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.albums&amp;lt;/code&amp;gt;&lt;br /&gt;
|Album information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.artists&amp;lt;/code&amp;gt;&lt;br /&gt;
|Artist information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.movies&amp;lt;/code&amp;gt;&lt;br /&gt;
|Movie information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.musicvideos&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music video information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.tvshows&amp;lt;/code&amp;gt;&lt;br /&gt;
|TV information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.library&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.ui.screensaver&amp;lt;/code&amp;gt;&lt;br /&gt;
|Screensaver&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.player.musicviz&amp;lt;/code&amp;gt;&lt;br /&gt;
|Visualization&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Plugin sources#What Kodi requires for your add-on|xbmc.python.pluginsource]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script sources#What Kodi requires for your add-on|xbmc.python.script]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|Weather&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.subtitle.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|Subtitle service module&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script lyrics#What Kodi requires for your add-on|xbmc.python.lyrics]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Lyrics&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script library#What Kodi requires for your add-on|xbmc.python.library]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|These don&#039;t show up in the addon browser and are purely as support for other scripts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Picture Add-ons (image)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.images&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional image files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.language&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional language files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add-ons that don&#039;t correspond to a specific add-on category can not be installed by users. These are usually supporting or shared add-ons that are installed automatically by the add-ons that require them.&lt;br /&gt;
&lt;br /&gt;
=== xbmc.python.pluginsource ===&lt;br /&gt;
{{See also|Plugin sources}}&lt;br /&gt;
&lt;br /&gt;
The most common extension point that will be used by plugin addon developers is &amp;lt;code&amp;gt;xbmc.python.pluginsource&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== library attribute ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; element has an extra attribute: &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt;. This is the name of the Python script (startup script) that will be run when the add-on is activated. This file must exist in the root of your add-on directory.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;provides&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
The extension has an additional child element named &amp;lt;code&amp;gt;&amp;lt;provides&amp;gt;&amp;lt;/code&amp;gt;, which contains a whitespace separated list of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;, and/or &amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;. This determines in what area (or context) of the Kodi system your addon will make itself visible in (please note that this applies only to plugin extension points):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Provides&lt;br /&gt;
!Appears in&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Pictures&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|Programs&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|Not visible&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;gpodderxbmc.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;provides&amp;gt;audio video&amp;lt;/provides&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xbmc.addon.metadata ===&lt;br /&gt;
&lt;br /&gt;
This special extension point &#039;&#039;must&#039;&#039; be provided by all add-ons, and is the way that your add-on is described to users of the Kodi add-on manager.&lt;br /&gt;
&lt;br /&gt;
==== Required elements ====&lt;br /&gt;
&lt;br /&gt;
There are several elements that this should contain and all are compulsory (except the broken tag). Each of the elements below must always be present in English as a minimum.&lt;br /&gt;
&lt;br /&gt;
Many of these elements can be translated into multiple languages and should be added once for each supported language. See the [[List of language codes (ISO-639:1988)]] for possible language strings. If there&#039;s no &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute for a translatable element, it defaults to English. However, even for English, adding the &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute is recommended.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;summary&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;summary&amp;gt;&amp;lt;/code&amp;gt; elements provide a short summary of what the add-on does. This should be a single sentence. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: Kodi v15 uses [https://en.wikipedia.org/wiki/Locale_(computer_software) locale identifiers] for the lang attribute, v14 and older uses ISO 639-1.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;description&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;description&amp;gt;&amp;lt;/code&amp;gt; elements provide a more detailed summary of what the add-on does. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;disclaimer&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;disclaimer&amp;gt;&amp;lt;/code&amp;gt; elements that indicate what (if any) things the user should know about the add-on. There is no need to have a disclaimer if you don&#039;t want one, though if something requires settings, or only works in a particular country then you may want to state this here. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en_GB&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;news&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|For Kodi v17 Krypton and later only.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;news&amp;gt;&amp;lt;/code&amp;gt; element should contains a simple description of the major changes made to the add-on (new functionality, big fixes, etc). This is displayed in the Kodi addon installation/update system. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;news&amp;gt;v0.1.2  (2014-1-15)&lt;br /&gt;
- Added notification for Ubuntu users checking through apt command&amp;lt;/news&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;platform&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;platform&amp;gt;&amp;lt;/code&amp;gt; tag specifies which platforms (operating systems, hardware) this add-on runs on. Many add-ons will run on all platforms, so &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; is an option. If the platform tag is missing, we assume the add-on runs on all platforms. A combination of these is also possible. Currently available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;linux&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx64&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ios&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;windx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;android&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;language&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;language&amp;gt;&amp;lt;/code&amp;gt; elements indicate the language(s) of the &#039;&#039;content&#039;&#039; provided by your add-on. It applies to plugins, scripts, scrapers etc. This allows browsing the add-on list by language. When there is no specific language provided in your content, leave it blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;language&amp;gt;en de fr&amp;lt;/language&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;license&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;license&amp;gt;&amp;lt;/code&amp;gt; element indicates what license is used for this add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;forum&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;forum&amp;gt;&amp;lt;/code&amp;gt; element provides the forum thread URL for this specific add-on. Leave this blank if there is no forum thread.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;forum&amp;gt;http://www.myaddonwebsite.com/forum.php?thread=12345&amp;lt;/forum&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;website&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;website&amp;gt;&amp;lt;/code&amp;gt; element provides the website URL for this specific add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;website&amp;gt;http://www.myaddonwebsite.com/&amp;lt;/website&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element provides the URL for the source code for this specific add-on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source&amp;gt;http://github.com/someone/myaddon&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;email&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/code&amp;gt; element provides the email address of the author if he wishes to do so for this specific add-on. Here are two examples of how you can make it look (the second one it harder for spambots to use). This can be left blank if you do not want to make your email address public.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;email&amp;gt;foo@bar.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;email&amp;gt;foo at bar dot com&amp;lt;/email&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;broken&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;broken&amp;gt;&amp;lt;/code&amp;gt; tag will mark the add-on as broken in the Kodi repo and provide the reason why. You don&#039;t need to do a version bump for this to work. However a bump is recommended as you could also add this to the changelog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;broken&amp;gt;deprecated&amp;lt;/broken&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skin specific elements ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
|  &#039;&#039;&#039;effectslowdown&#039;&#039;&#039;&lt;br /&gt;
|  A multiplier that is applied to all &amp;lt;animation&amp;gt; effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;debugging&#039;&#039;&#039;&lt;br /&gt;
|  When set to true, it&#039;ll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;res&#039;&#039;&#039;&lt;br /&gt;
|  Support for arbitrary skin resolutions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How window xml files are found ===&lt;br /&gt;
&lt;br /&gt;
Kodi can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain &amp;lt;width&amp;gt; and &amp;lt;height&amp;gt; tags. That way, Kodi can scale the controls to the new screen resolution.&lt;br /&gt;
&lt;br /&gt;
However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).&lt;br /&gt;
&lt;br /&gt;
The order that Kodi looks for it&#039;s skin files are as follows:&lt;br /&gt;
&lt;br /&gt;
# It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)&lt;br /&gt;
# If the current screenmode is 1080i and there&#039;s no 1080i folder, it then looks in the 720p folder.&lt;br /&gt;
# Finally, it looks in the &#039;&#039;&#039;res&#039;&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the &amp;lt;defaultresolution&amp;gt; folder, preventing needless repetition.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== addon.xml for skins ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
﻿&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
  id=&amp;quot;skin.confluence&amp;quot;&lt;br /&gt;
  version=&amp;quot;2.1.3&amp;quot;&lt;br /&gt;
  name=&amp;quot;Confluence&amp;quot;&lt;br /&gt;
  provider-name=&amp;quot;Jezz_X, Team Kodi&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.gui&amp;quot; version=&amp;quot;4.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension&lt;br /&gt;
    point=&amp;quot;xbmc.gui.skin&amp;quot;&lt;br /&gt;
    debugging=&amp;quot;false&amp;quot;&lt;br /&gt;
    effectslowdown=&amp;quot;0.75&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;res width=&amp;quot;1280&amp;quot; height=&amp;quot;720&amp;quot; aspect=&amp;quot;16:9&amp;quot; default=&amp;quot;true&amp;quot; folder=&amp;quot;720p&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Confluence skin by Jezz_X. (Kodi&#039;s default skin)&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi 9.11 and above. It is a combination of concepts from many popular skins, and attempts to embrace and integrate their good ideas into a skin that should be easy for first time Kodi users to understand and use.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi, removing it may cause issues&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
One thing to note is that &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;all tag names are lower case.&amp;lt;/font&amp;gt; XML tag names are case sensitive!&lt;br /&gt;
&lt;br /&gt;
== addon.xml for scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
    id=&amp;quot;script.artwork.downloader&amp;quot;&lt;br /&gt;
    name=&amp;quot;Artwork Downloader&amp;quot;&lt;br /&gt;
    version=&amp;quot;12.0.12&amp;quot;&lt;br /&gt;
    provider-name=&amp;quot;Martijn&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.json&amp;quot;                   version=&amp;quot;6.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.addon&amp;quot;                  version=&amp;quot;12.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot; optional=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.common.plugin.cache&amp;quot;  version=&amp;quot;1.3.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.script&amp;quot;         library=&amp;quot;default.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;executable&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Downloads Artwork for TV shows, Movies and Musicvideos in your library&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork[CR]Artwork sources:[CR]www.fanart.tv[CR]www.thetvdb.com[CR]www.themoviedb.org[CR]Remark:[CR]Check your skin to see what type of artwork is supported![CR]Each TV Show/Movie must have its own folder![CR]Skin integration:[CR]See readme file&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;For bugs, requests or general questions visit the Artwork Downloader thread on the Kodi forum.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Schema Definition =&lt;br /&gt;
&lt;br /&gt;
The XML schema definition for &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; is located [https://github.com/xbmc/xbmc/blob/master/addons/xbmc.addon/metadata.xsd here].&lt;br /&gt;
&lt;br /&gt;
{{frodo updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Addon.xml&amp;diff=123235</id>
		<title>Addon.xml</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Addon.xml&amp;diff=123235"/>
		<updated>2016-06-19T12:15:08Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /*  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every skin, script, or plugin in Kodi contains an &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file which describes the add-on, providing credits, version information and dependencies. Below, we will explain how this file is structured and which elements must be used to create an add-on for Kodi. You can also consult the examples at the end to see how this file is laid out depending on if you are developing a skin or script.&lt;br /&gt;
&lt;br /&gt;
Every &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file has the same basic structure, this example is for a video plugin:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;plugin.addon.id&amp;quot; name=&amp;quot;Your Add-on&amp;quot; version=&amp;quot;1.2.3&amp;quot; provider-name=&amp;quot;You&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;video&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s summary&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en_gb&amp;quot;&amp;gt;Your add-on&#039;s description&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en_gb&amp;quot;&amp;gt;&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are a few important things to note in the above sample:&lt;br /&gt;
&lt;br /&gt;
* The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element must be present, and be the root node. It presents data about the add-on package as a whole.&lt;br /&gt;
* Inside the &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element is a &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element, listing all the dependencies that this add-on needs in order to function.&lt;br /&gt;
* Then there are one or more &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; elements, each of which describes a part of Kodi that the add-on extends.&lt;br /&gt;
* Finally, there is a specific &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element that extends &amp;lt;code&amp;gt;&amp;quot;xbmc.addon.metadata&amp;quot;&amp;lt;/code&amp;gt;. This describes the add-on to the user.&lt;br /&gt;
&lt;br /&gt;
= Elements =&lt;br /&gt;
 &lt;br /&gt;
== &amp;lt;addon&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;addon&amp;gt;&amp;lt;/code&amp;gt; element has 4 attributes, all required: &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;provider-name&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;script.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;0.0.1&amp;quot; provider-name=&amp;quot;Dev1, Dev2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== id attribute ===&lt;br /&gt;
&lt;br /&gt;
The id attribute is the unique identifier used for this add-on.  It must be unique, and must use only lowercase characters, periods, underscores, dashes and numbers.  This identifier is also used as the name of the folder that contains the add-on, so for ease of searching, we suggest you use something like &amp;lt;type&amp;gt;.&amp;lt;uniquename&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The version attribute is used by Kodi to determine whether updates are available. This should be use a version scheme like &amp;lt;code&amp;gt;x.y.z&amp;lt;/code&amp;gt; (major.minor.patch). For example: &amp;lt;code&amp;gt;version=&amp;quot;0.0.1&amp;quot;&amp;lt;/code&amp;gt;. Generally, you&#039;ll start with a version of &amp;lt;code&amp;gt;0.y.z&amp;lt;/code&amp;gt; for test releases and once you feel it is ready for a full release, you&#039;d bump the version to &amp;lt;code&amp;gt;1.0.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== How versioning works ====&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.10&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.3.0&amp;lt;/code&amp;gt;   is newer than &amp;lt;code&amp;gt;2.2.9&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~alpha&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta3&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta2&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;2.2.1~beta10&amp;lt;/code&amp;gt; is newer than &amp;lt;code&amp;gt;2.2.1~beta1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tip|Text should only be added for a beta version. In other cases version number should only contain numbers.}}&lt;br /&gt;
&lt;br /&gt;
=== name attribute ===&lt;br /&gt;
&lt;br /&gt;
The name attribute is the name of the add-on as it appears in the UI.  This should be in English where it makes sense for it to be so, and is not translatable.&lt;br /&gt;
&lt;br /&gt;
=== provider-name attribute ===&lt;br /&gt;
&lt;br /&gt;
The provider-name attribute is used as the author field.  This could be a team of authors or a single author. If the add-on is maintained by multiple people please separate them with a comma (&amp;lt;code&amp;gt;,&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;requires&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; element contains one or more &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; elements which specify which other add-ons this particular add-on requires, and which version of those add-ons it requires. These add-ons may be part of Kodi itself, or may be parts of other third-party add-ons.&lt;br /&gt;
&lt;br /&gt;
Kodi will only allow the add-on to be run if suitable versions of the (non-optional) add-ons on which this add-on depends are installed. When a user installs your add-on from an online repository via Kodi&#039;s add-on manager, Kodi attempts to resolve these dependencies, and install anything that your add-on relies on first. The dependency must be provided with the minimum version number your script/skin requires.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
Here is a sample &amp;lt;code&amp;gt;&amp;lt;requires&amp;gt;&amp;lt;/code&amp;gt; block that imports two required modules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.14.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&#039;s another example, which will only install on OpenELEC:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;requires&amp;gt;&lt;br /&gt;
  &amp;lt;import addon=&amp;quot;os.openelec.tv&amp;quot; version=&amp;quot;2.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/requires&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;import&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
Each &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element describes one dependency for an add-on, with two required attributes: &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt;. There is also an optional attribute called, fittingly, &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If your add-on relies on other third-party add-ons, Kodi will automatically install them as well, provided they are available on an existing add-on repository. If they aren&#039;t available on any existing repository, the user must install the other add-ons themselves. Note that you need to include any Python libraries you need directly in your add-on; these can&#039;t be loaded with an &amp;lt;code&amp;gt;&amp;lt;import&amp;gt;&amp;lt;/code&amp;gt; element, since Kodi wouldn&#039;t know what to do with them.&lt;br /&gt;
&lt;br /&gt;
=== addon attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;addon&amp;lt;/code&amp;gt; attribute specifies the id of the required add-on, e.g. &amp;lt;code&amp;gt;script.module.elementtree&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== version attribute ===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;version&amp;lt;/code&amp;gt; attribute specifies the minimum version of the required add-on to be installed.&lt;br /&gt;
&lt;br /&gt;
==== Dependency versions ====&lt;br /&gt;
&lt;br /&gt;
Each different Kodi version might require you to use a higher version of the &amp;lt;code&amp;gt;xbmc.*&amp;lt;/code&amp;gt; add-on dependencies to control on which version of Kodi the add-on can be installed.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Current versions&lt;br /&gt;
! Kodi version !! xbmc.python !! xbmc.gui !! xbmc.json !! xbmc.metadata !! xbmc.addon&lt;br /&gt;
|-&lt;br /&gt;
| Dharma 10.1 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 1.0 || 2.11 || 2.0|| 1.0 || 0.1&lt;br /&gt;
|-&lt;br /&gt;
| Eden 11.0 &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt; || 2.0 || 3.0 || 4.0 || 1.0 || 11.0&lt;br /&gt;
|-&lt;br /&gt;
| Frodo 12.x &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Deprecated&amp;lt;/font&amp;gt;|| 2.1.0 || 4.0.0 || 6.0.0 || 2.1.0 || 12.0.0&lt;br /&gt;
|-&lt;br /&gt;
| Gotham 13.x || 2.14.0 (ABI 2.1.0) || 5.0.1 || 6.6.0 (ABI 6.0.0) || 2.1.0 || 13.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Helix 14.x || 2.19.0 (ABI 2.1.0) || 5.3.0 || 6.20.0 (ABI 6.0.0) || 2.1.0 || 14.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Isengard 15.x || 2.20.0 (ABI 2.1.0) || 5.9.0 (ABI 5.3.0) || 6.25.1 (ABI 6.0.0) || 2.1.0 || 15.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Jarvis 16.x || 2.24.0 (ABI 2.1.0) || 5.10.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 16.0.0 (ABI 12.0.0)&lt;br /&gt;
|-&lt;br /&gt;
| Krypton 17.x || 2.25.0 (ABI 2.1.0) || 5.11.0 || 6.32.4 (ABI 6.0.0) || 2.1.0 || 17.0.0 (ABI 12.0.0)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each Kodi version contain a certain backwards compatibility. For example add-ons made for Gotham 13.x can still work ion Jarvis 16.x. Do note that this might change in the future. The &#039;&#039;&#039;ABI&#039;&#039;&#039; version you see in the table above is the backwards compatibility version for which add-ons are still marked &amp;quot;working&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== optional attribute ===&lt;br /&gt;
&lt;br /&gt;
The dependency may be made optional by setting the &amp;lt;code&amp;gt;optional&amp;lt;/code&amp;gt; attribute to &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;. This will only install the dependency when the add-on actually needs it. Even if this dependency is missing, the add-on can still be installed.&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;extension&amp;gt; ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension&amp;gt;&amp;lt;/code&amp;gt; element describes the technical aspects of this add-on. It will have at least a point attribute which will give the part of Kodi that the add-on extends. For instance, the &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; file for the Confluence skin extends the &amp;lt;code&amp;gt;xbmc.gui.skin&amp;lt;/code&amp;gt; part of xbmc. All available extension points are given below.&lt;br /&gt;
&lt;br /&gt;
The various extension points that Kodi provides are given in the list below.&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Extension point&lt;br /&gt;
!Add-on Category&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Skinning|xbmc.gui.skin]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Skin&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.webinterface&amp;lt;/code&amp;gt;&lt;br /&gt;
|Web interface&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Add-on repositories|xbmc.addon.repository]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[HOW-TO:_Automatically_start_addons_using_services|xbmc.service]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Services&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.albums&amp;lt;/code&amp;gt;&lt;br /&gt;
|Album information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.artists&amp;lt;/code&amp;gt;&lt;br /&gt;
|Artist information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.movies&amp;lt;/code&amp;gt;&lt;br /&gt;
|Movie information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.musicvideos&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music video information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.tvshows&amp;lt;/code&amp;gt;&lt;br /&gt;
|TV information&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.metadata.scraper.library&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.ui.screensaver&amp;lt;/code&amp;gt;&lt;br /&gt;
|Screensaver&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.player.musicviz&amp;lt;/code&amp;gt;&lt;br /&gt;
|Visualization&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Plugin sources#What Kodi requires for your add-on|xbmc.python.pluginsource]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script sources#What Kodi requires for your add-on|xbmc.python.script]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio) / Picture Add-ons (image) / Program Add-ons (executable) / Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.weather&amp;lt;/code&amp;gt;&lt;br /&gt;
|Weather&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.subtitle.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|Subtitle service module&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script lyrics#What Kodi requires for your add-on|xbmc.python.lyrics]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|Lyrics&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;[[Script library#What Kodi requires for your add-on|xbmc.python.library]]&amp;lt;/code&amp;gt;&lt;br /&gt;
|&#039;&#039;None&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.python.module&amp;lt;/code&amp;gt;&lt;br /&gt;
|These don&#039;t show up in the addon browser and are purely as support for other scripts.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video Add-ons (video)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music Add-ons (audio)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;xbmc.addon.image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Picture Add-ons (image)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.images&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional image files&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;kodi.resource.language&amp;lt;/code&amp;gt;&lt;br /&gt;
|Additional language files&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Add-ons that don&#039;t correspond to a specific add-on category can not be installed by users. These are usually supporting or shared add-ons that are installed automatically by the add-ons that require them.&lt;br /&gt;
&lt;br /&gt;
=== xbmc.python.pluginsource ===&lt;br /&gt;
{{See also|Plugin sources}}&lt;br /&gt;
&lt;br /&gt;
The most common extension point that will be used by plugin addon developers is &amp;lt;code&amp;gt;xbmc.python.pluginsource&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== library attribute ====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot;&amp;gt;&amp;lt;/code&amp;gt; element has an extra attribute: &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt;. This is the name of the Python script (startup script) that will be run when the add-on is activated. This file must exist in the root of your add-on directory.&lt;br /&gt;
&lt;br /&gt;
==== &amp;lt;provides&amp;gt; element ====&lt;br /&gt;
&lt;br /&gt;
The extension has an additional child element named &amp;lt;code&amp;gt;&amp;lt;provides&amp;gt;&amp;lt;/code&amp;gt;, which contains a whitespace separated list of &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;, and/or &amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;. This determines in what area (or context) of the Kodi system your addon will make itself visible in (please note that this applies only to plugin extension points):&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
!Provides&lt;br /&gt;
!Appears in&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
|Pictures&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt;&lt;br /&gt;
|Music&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;&lt;br /&gt;
|Video&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;executable&amp;lt;/code&amp;gt;&lt;br /&gt;
|Programs&lt;br /&gt;
|-&lt;br /&gt;
|&#039;&#039;(blank)&#039;&#039;&lt;br /&gt;
|Not visible&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Example ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;xbmc.python.pluginsource&amp;quot; library=&amp;quot;gpodderxbmc.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;provides&amp;gt;audio video&amp;lt;/provides&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== xbmc.addon.metadata ===&lt;br /&gt;
&lt;br /&gt;
This special extension point &#039;&#039;must&#039;&#039; be provided by all add-ons, and is the way that your add-on is described to users of the Kodi add-on manager.&lt;br /&gt;
&lt;br /&gt;
==== Required elements ====&lt;br /&gt;
&lt;br /&gt;
There are several elements that this should contain and all are compulsory (except the broken tag). Each of the elements below must always be present in English as a minimum.&lt;br /&gt;
&lt;br /&gt;
Many of these elements can be translated into multiple languages and should be added once for each supported language. See the [[List of language codes (ISO-639:1988)]] for possible language strings. If there&#039;s no &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute for a translatable element, it defaults to English. However, even for English, adding the &amp;lt;code&amp;gt;lang&amp;lt;/code&amp;gt; attribute is recommended.&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;summary&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;summary&amp;gt;&amp;lt;/code&amp;gt; elements provide a short summary of what the add-on does. This should be a single sentence. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Kodi v15 Isengard we recommend you use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;summary lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script.&amp;lt;/summary&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;description&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;description&amp;gt;&amp;lt;/code&amp;gt; elements provide a more detailed summary of what the add-on does. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Kodi v15 Isengard we recommend you use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;description lang=&amp;quot;en_GB&amp;quot;&amp;gt;Hello World script provides some basic examples on how to create your first script&lt;br /&gt;
 and hopefully will increase the number of Kodi users to start creating their own addons.&amp;lt;/description&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;disclaimer&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
One or more &amp;lt;code&amp;gt;&amp;lt;disclaimer&amp;gt;&amp;lt;/code&amp;gt; elements that indicate what (if any) things the user should know about the add-on. There is no need to have a disclaimer if you don&#039;t want one, though if something requires settings, or only works in a particular country then you may want to state this here. It may be translated into multiple languages.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From Kodi v15 Isengard we recommend you use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;disclaimer lang=&amp;quot;en_GB&amp;quot;&amp;gt;Feel free to use this script. For information visit the wiki.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;news&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
{{note|For Kodi v17 Krypton and later only.}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;news&amp;gt;&amp;lt;/code&amp;gt; element should contains a simple description of the major changes made to the add-on (new functionality, big fixes, etc). This is displayed in the Kodi addon installation/update system. (In the author&#039;s opinion, too many add-ons skip this piece of information, making it difficult for users to determine whether a particular problem that they may have been having has been fixed or not.)&lt;br /&gt;
&lt;br /&gt;
Here is an example: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;news&amp;gt;v0.1.2  (2014-1-15)&lt;br /&gt;
- Added notification for Ubuntu users checking through apt command&amp;lt;/news&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;platform&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;platform&amp;gt;&amp;lt;/code&amp;gt; tag specifies which platforms (operating systems, hardware) this add-on runs on. Many add-ons will run on all platforms, so &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; is an option. If the platform tag is missing, we assume the add-on runs on all platforms. A combination of these is also possible. Currently available options are:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;linux&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx64&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;osx32&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;ios&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;windx&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;android&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;language&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;language&amp;gt;&amp;lt;/code&amp;gt; elements indicate the language(s) of the &#039;&#039;content&#039;&#039; provided by your add-on. It applies to plugins, scripts, scrapers etc. This allows browsing the add-on list by language. When there is no specific language provided in your content, leave it blank.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;language&amp;gt;en de fr&amp;lt;/language&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;license&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;license&amp;gt;&amp;lt;/code&amp;gt; element indicates what license is used for this add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;forum&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;forum&amp;gt;&amp;lt;/code&amp;gt; element provides the forum thread URL for this specific add-on. Leave this blank if there is no forum thread.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;forum&amp;gt;http://www.myaddonwebsite.com/forum.php?thread=12345&amp;lt;/forum&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;website&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;website&amp;gt;&amp;lt;/code&amp;gt; element provides the website URL for this specific add-on.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;website&amp;gt;http://www.myaddonwebsite.com/&amp;lt;/website&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;&amp;lt;source&amp;gt;&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; element provides the URL for the source code for this specific add-on.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;source&amp;gt;http://github.com/someone/myaddon&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;email&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;email&amp;gt;&amp;lt;/code&amp;gt; element provides the email address of the author if he wishes to do so for this specific add-on. Here are two examples of how you can make it look (the second one it harder for spambots to use). This can be left blank if you do not want to make your email address public.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;email&amp;gt;foo@bar.com&amp;lt;/email&amp;gt;&lt;br /&gt;
    or&lt;br /&gt;
&amp;lt;email&amp;gt;foo at bar dot com&amp;lt;/email&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;broken&amp;gt; =====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;&amp;lt;broken&amp;gt;&amp;lt;/code&amp;gt; tag will mark the add-on as broken in the Kodi repo and provide the reason why. You don&#039;t need to do a version bump for this to work. However a bump is recommended as you could also add this to the changelog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;broken&amp;gt;deprecated&amp;lt;/broken&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Skin specific elements ==&lt;br /&gt;
=== Overview ===&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot;&lt;br /&gt;
|  &#039;&#039;&#039;effectslowdown&#039;&#039;&#039;&lt;br /&gt;
|  A multiplier that is applied to all &amp;lt;animation&amp;gt; effect lengths in the skin. Useful to slow down all animations globally so that you can better configure timings and see interactions between animating controls.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;debugging&#039;&#039;&#039;&lt;br /&gt;
|  When set to true, it&#039;ll display onscreen debug information (xml filename, mouse position and focused control type and name) in the skin.&lt;br /&gt;
|- &lt;br /&gt;
|  &#039;&#039;&#039;res&#039;&#039;&#039;&lt;br /&gt;
|  Support for arbitrary skin resolutions.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== How window xml files are found ===&lt;br /&gt;
&lt;br /&gt;
Kodi can run in many differing resolutions, and a skin should try and cater to all these resolutions. The easiest way is to develop for one specific resolution and make sure that all controls contain &amp;lt;width&amp;gt; and &amp;lt;height&amp;gt; tags. That way, Kodi can scale the controls to the new screen resolution.&lt;br /&gt;
&lt;br /&gt;
However, you may choose to develop alternative window xml files for differing resolutions (such as for HDTV resolutions, or for widescreen versus 4x3 resolutions).&lt;br /&gt;
&lt;br /&gt;
The order that Kodi looks for it&#039;s skin files are as follows:&lt;br /&gt;
&lt;br /&gt;
# It first looks in the current screenmode folder (one of 1080i, 720p, NTSC16x9, NTSC, PAL16x9 or PAL)&lt;br /&gt;
# If the current screenmode is 1080i and there&#039;s no 1080i folder, it then looks in the 720p folder.&lt;br /&gt;
# Finally, it looks in the &#039;&#039;&#039;res&#039;&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
This allows you to just put any window files that do not require special treatment for 16x9 resolutions etc. in the &amp;lt;defaultresolution&amp;gt; folder, preventing needless repetition.&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
&lt;br /&gt;
== addon.xml for skins ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
﻿&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
  id=&amp;quot;skin.confluence&amp;quot;&lt;br /&gt;
  version=&amp;quot;2.1.3&amp;quot;&lt;br /&gt;
  name=&amp;quot;Confluence&amp;quot;&lt;br /&gt;
  provider-name=&amp;quot;Jezz_X, Team Kodi&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.gui&amp;quot; version=&amp;quot;4.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension&lt;br /&gt;
    point=&amp;quot;xbmc.gui.skin&amp;quot;&lt;br /&gt;
    debugging=&amp;quot;false&amp;quot;&lt;br /&gt;
    effectslowdown=&amp;quot;0.75&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;res width=&amp;quot;1280&amp;quot; height=&amp;quot;720&amp;quot; aspect=&amp;quot;16:9&amp;quot; default=&amp;quot;true&amp;quot; folder=&amp;quot;720p&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Confluence skin by Jezz_X. (Kodi&#039;s default skin)&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi 9.11 and above. It is a combination of concepts from many popular skins, and attempts to embrace and integrate their good ideas into a skin that should be easy for first time Kodi users to understand and use.&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;Confluence is the default skin for Kodi, removing it may cause issues&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
One thing to note is that &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;all tag names are lower case.&amp;lt;/font&amp;gt; XML tag names are case sensitive!&lt;br /&gt;
&lt;br /&gt;
== addon.xml for scripts ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon&lt;br /&gt;
    id=&amp;quot;script.artwork.downloader&amp;quot;&lt;br /&gt;
    name=&amp;quot;Artwork Downloader&amp;quot;&lt;br /&gt;
    version=&amp;quot;12.0.12&amp;quot;&lt;br /&gt;
    provider-name=&amp;quot;Martijn&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot;                 version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.json&amp;quot;                   version=&amp;quot;6.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.addon&amp;quot;                  version=&amp;quot;12.0.0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.elementtree&amp;quot;   version=&amp;quot;1.2.7&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.module.simplejson&amp;quot;    version=&amp;quot;2.0.10&amp;quot; optional=&amp;quot;true&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;script.common.plugin.cache&amp;quot;  version=&amp;quot;1.3.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.python.script&amp;quot;         library=&amp;quot;default.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;provides&amp;gt;executable&amp;lt;/provides&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;Downloads Artwork for TV shows, Movies and Musicvideos in your library&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description lang=&amp;quot;en&amp;quot;&amp;gt;Downloads all available artwork for TV shows, Movies and Musicvideos in your library. Check the options for supported artwork[CR]Artwork sources:[CR]www.fanart.tv[CR]www.thetvdb.com[CR]www.themoviedb.org[CR]Remark:[CR]Check your skin to see what type of artwork is supported![CR]Each TV Show/Movie must have its own folder![CR]Skin integration:[CR]See readme file&amp;lt;/description&amp;gt;&lt;br /&gt;
    &amp;lt;disclaimer lang=&amp;quot;en&amp;quot;&amp;gt;For bugs, requests or general questions visit the Artwork Downloader thread on the Kodi forum.&amp;lt;/disclaimer&amp;gt;&lt;br /&gt;
    &amp;lt;language&amp;gt;&amp;lt;/language&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;license&amp;gt;GNU GENERAL PUBLIC LICENSE. Version 2, June 1991&amp;lt;/license&amp;gt;&lt;br /&gt;
    &amp;lt;forum&amp;gt;&amp;lt;/forum&amp;gt;&lt;br /&gt;
    &amp;lt;website&amp;gt;&amp;lt;/website&amp;gt;&lt;br /&gt;
    &amp;lt;email&amp;gt;&amp;lt;/email&amp;gt;&lt;br /&gt;
    &amp;lt;source&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Schema Definition =&lt;br /&gt;
&lt;br /&gt;
The XML schema definition for &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; is located [https://github.com/xbmc/xbmc/blob/master/addons/xbmc.addon/metadata.xsd here].&lt;br /&gt;
&lt;br /&gt;
{{frodo updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=117557</id>
		<title>Context Item Add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=117557"/>
		<updated>2016-03-12T10:58:36Z</updated>

		<summary type="html">&lt;p&gt;Takoi: update to jarvis api&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Context item add-ons allows the [[context menu]] in Kodi to be extended. Add-ons must provide the &amp;lt;code&amp;gt;kodi.context.item&amp;lt;/code&amp;gt; extension point and a &amp;lt;menu&amp;gt; definition. &lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;kodi.context.item&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;menu id=&amp;quot;kodi.core.main&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;item library=&amp;quot;contextitem.py&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;30000&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;visible&amp;gt;true&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;/item&amp;gt;&lt;br /&gt;
  &amp;lt;/menu&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first &amp;lt;menu&amp;gt; element defines which top level menu to attach to. In core, there are two available: &amp;lt;code&amp;gt;kodi.core.main&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;kodi.core.manage&amp;lt;/code&amp;gt;. Add-on may attach to menu defined by other add-ons as well. Next, the &amp;lt;item&amp;gt; element defines the action to add to the menu. &amp;lt;code&amp;gt;library&amp;lt;/code&amp;gt; is the file to execute, &amp;lt;label&amp;gt; a string or an ID from the language file to show in the context menu.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;visible&amp;gt; (required) should contain a [[Conditional visibility|visibility expression]] and will determine when the item is be visible in the [[context menu]]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This feature requires at least version 2.23.0 of the Python API (Jarvis), which should be specified in the [[Addon.xml#&amp;lt;requires&amp;gt;]] element:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.23.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Keep in mind that there is limited space in the [[context menu]]. Attaching context menu to an add-on will force the user to have all of them enabled at the same time. Consider using [[#submenus]] or a creating a separate add-on.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Submenus ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;menu&amp;gt; and &amp;lt;item&amp;gt; elements may be mixed and nested to created submenus. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;menu id=&amp;quot;kodi.core.main&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;menu&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;My submenu&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;item library=&amp;quot;contextitem1.py&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Item 1&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;visible&amp;gt;true&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;/item&amp;gt;&lt;br /&gt;
    &amp;lt;item library=&amp;quot;contextitem2.py&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Item 2&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;visible&amp;gt;true&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;/item&amp;gt;&lt;br /&gt;
    &amp;lt;menu&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Subsubmenu&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;item library=&amp;quot;contextitem3.py&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;label&amp;gt;Item 3&amp;lt;/label&amp;gt;&lt;br /&gt;
        &amp;lt;visible&amp;gt;true&amp;lt;/visible&amp;gt;&lt;br /&gt;
      &amp;lt;/item&amp;gt;&lt;br /&gt;
    &amp;lt;/menu&amp;gt;&lt;br /&gt;
&amp;lt;/menu&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Accessing information about selected item ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;sys.listitem&amp;lt;/code&amp;gt; attribute contains a copy of the item the context menu was opened on. It is an instance of &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt;. See http://mirrors.xbmc.org/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem for available properties.&lt;br /&gt;
&lt;br /&gt;
Example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    message = &amp;quot;Clicked on &#039;%s&#039;&amp;quot; % sys.listitem.getLabel()&lt;br /&gt;
    xbmc.executebuiltin(&amp;quot;Notification(\&amp;quot;Hello context items!\&amp;quot;, \&amp;quot;%s\&amp;quot;)&amp;quot; % message)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== v15 Isengard (deprecated) ==&lt;br /&gt;
Isengard, API version 2.20.0, does not support &amp;lt;menu&amp;gt; definition and can only define a single item as follows:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;kodi.context.item&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;item&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;Hello World&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;visible&amp;gt;!IsEmpty(ListItem.Genre)&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;parent&amp;gt;kodi.core.manage&amp;lt;/parent&amp;gt;&lt;br /&gt;
  &amp;lt;/item&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This syntax is considered deprecated and will be removed in future versions.&lt;br /&gt;
&lt;br /&gt;
Note: Both syntaxes are &#039;&#039;&#039;backwards&#039;&#039;&#039; and &#039;&#039;&#039;forward&#039;&#039;&#039; compatible. Add-ons may use both the old &amp;lt;item&amp;gt; and the new &amp;lt;menu&amp;gt; at the same time for comparability with v15 Isengard and v16 Jarvis.&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=113156</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=113156"/>
		<updated>2016-01-13T13:29:02Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Same. This page is not at place to dump links to external tutorials&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for Kodi. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs/ Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons, thumbnails and artwork ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
Kodi also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
info = {&lt;br /&gt;
    &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
    &#039;year&#039;: 1979,&lt;br /&gt;
    &#039;title&#039;: &#039;Alien&#039;,&lt;br /&gt;
}&lt;br /&gt;
li.setInfo(&#039;video&#039;, info)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
video_info = {&lt;br /&gt;
    &#039;codec&#039;: &#039;h264&#039;,&lt;br /&gt;
    &#039;aspect&#039;: 1.78,&lt;br /&gt;
    &#039;width&#039;: 1280,&lt;br /&gt;
    &#039;height&#039;: 720,&lt;br /&gt;
}&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, video_info)&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, {&#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2})&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, {&#039;language&#039;: &#039;en&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Video_addon&amp;diff=113155</id>
		<title>HOW-TO:Video addon</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Video_addon&amp;diff=113155"/>
		<updated>2016-01-13T13:27:28Z</updated>

		<summary type="html">&lt;p&gt;Takoi: This page is not at place to dump links to external tutorials&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]|[[Python development]]|[[Python examples]]}}&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This tutorial will explain how to write your first Kodi/XBMC video plugin Add-on&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Tools=&lt;br /&gt;
Assuming you have already followed the Hello World Add-on you will have a text editor already setup. Since we are dealing with videos this time its probably a good idea to have a video player setup. We recommend another great open source project for this&lt;br /&gt;
&lt;br /&gt;
- VLC http://www.videolan.org/vlc/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Installing=&lt;br /&gt;
For this example we will use 2 nice basic video Add-on tutorials You can find the source-code here:&lt;br /&gt;
&lt;br /&gt;
https://github.com/romanvm/plugin.video.example&lt;br /&gt;
&lt;br /&gt;
You can either download as a zip and install both of these inside the kodi GUI from the install from zip feature. Or extract the zip into your userdata/add-ons folder.&lt;br /&gt;
&lt;br /&gt;
=Testing=&lt;br /&gt;
You can first give the add-on a test run by going to:&lt;br /&gt;
System &amp;gt;&amp;gt; Add-Ons &amp;gt;&amp;gt; Enabled Add-Ons &amp;gt;&amp;gt; Video Add-Ons &amp;gt;&amp;gt; Example Kodi video Plugin. You should now be able to watch some test videos hosted from an internet web server.&lt;br /&gt;
&lt;br /&gt;
[[File:Videotutorial1.jpg]]&lt;br /&gt;
&lt;br /&gt;
=Explanation=&lt;br /&gt;
So whats happening in this add-on?&lt;br /&gt;
&lt;br /&gt;
Basically the Add-on is checking a website for the hosted videos. In this example we are directly linking to the videos, but there are possibilities for dynamic content and scraping of just about any online source&lt;br /&gt;
&lt;br /&gt;
Once the video link is sent to Kodi, our video player takes over and buffers, then plays the video just like any other media.&lt;br /&gt;
&lt;br /&gt;
=Structure=&lt;br /&gt;
main.py &amp;lt;-- This is the actual python code for your Add-On&lt;br /&gt;
&lt;br /&gt;
addon.xml &amp;lt;-- This is the Add-Ons metadata&lt;br /&gt;
&lt;br /&gt;
icon.png &amp;lt;-- A PNG icon for the add-on. It can be 256x256 or 512x512 pixels big. Try to make it look nice!&lt;br /&gt;
&lt;br /&gt;
Readme.md &amp;lt;-- The readme text file with a description of the Add-on and install instructions. This shows on the front of the GitHub page and helps users to understand your Add-on before downloading.&lt;br /&gt;
&lt;br /&gt;
=The Code=&lt;br /&gt;
So now we come to the actual Add-On code, this is where most of your Add-on is written and is a simple text file containing python code.&lt;br /&gt;
&lt;br /&gt;
First we initialize the Add-on and import and bits we need&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
     import sys&lt;br /&gt;
     from urlparse import parse_qsl&lt;br /&gt;
     import xbmcgui&lt;br /&gt;
     import xbmcplugin&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we do something else...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
     # Get the plugin url in plugin:// notation.&lt;br /&gt;
     __url__ = sys.argv[0]&lt;br /&gt;
     # Get the plugin handle as an integer number.&lt;br /&gt;
     __handle__ = int(sys.argv[1])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we use a fixed set of properties simply for demonstrating purposes. In a &amp;quot;real life&amp;quot; plugin you will need to get info and links to video files/streams from some web-site or online service.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
VIDEOS = {&#039;Animals&#039;: [{&#039;name&#039;: &#039;Crab&#039;,&lt;br /&gt;
                       &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/crab.jpg&#039;,&lt;br /&gt;
                       &#039;video&#039;: &#039;http://www.vidsplay.com/vids/crab.mp4&#039;,&lt;br /&gt;
                       &#039;genre&#039;: &#039;Animals&#039;},&lt;br /&gt;
                      {&#039;name&#039;: &#039;Alligator&#039;,&lt;br /&gt;
                       &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/alligator.jpg&#039;,&lt;br /&gt;
                       &#039;video&#039;: &#039;http://www.vidsplay.com/vids/alligator.mp4&#039;,&lt;br /&gt;
                       &#039;genre&#039;: &#039;Animals&#039;},&lt;br /&gt;
                      {&#039;name&#039;: &#039;Turtle&#039;,&lt;br /&gt;
                       &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/turtle.jpg&#039;,&lt;br /&gt;
                       &#039;video&#039;: &#039;http://www.vidsplay.com/vids/turtle.mp4&#039;,&lt;br /&gt;
                       &#039;genre&#039;: &#039;Animals&#039;}&lt;br /&gt;
                      ],&lt;br /&gt;
            &#039;Cars&#039;: [{&#039;name&#039;: &#039;Postal Truck&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/us_postal.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/us_postal.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Cars&#039;},&lt;br /&gt;
                     {&#039;name&#039;: &#039;Traffic&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/traffic1.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/traffic1.avi&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Cars&#039;},&lt;br /&gt;
                     {&#039;name&#039;: &#039;Traffic Arrows&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/traffic_arrows.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/traffic_arrows.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Cars&#039;}&lt;br /&gt;
                     ],&lt;br /&gt;
            &#039;Food&#039;: [{&#039;name&#039;: &#039;Chicken&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/chicken.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/bbqchicken.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Food&#039;},&lt;br /&gt;
                     {&#039;name&#039;: &#039;Hamburger&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/hamburger.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/hamburger.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Food&#039;},&lt;br /&gt;
                     {&#039;name&#039;: &#039;Pizza&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/pizza.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/pizza.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Food&#039;}&lt;br /&gt;
                     ]}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And now we define something else...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def get_categories():&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         Get the list of video categories.&lt;br /&gt;
         Here you can insert some parsing code that retrieves&lt;br /&gt;
         the list of video categories (e.g. &#039;Movies&#039;, &#039;TV-shows&#039;, &#039;Documentaries&#039; etc.)&lt;br /&gt;
         from some site or server.&lt;br /&gt;
         :return: list&lt;br /&gt;
         &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
         return VIDEOS.keys()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And now we define something else...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def get_videos(category):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Get the list of videofiles/streams.&lt;br /&gt;
    Here you can insert some parsing code that retrieves&lt;br /&gt;
    the list of videostreams in a given category from some site or server.&lt;br /&gt;
    :param category: str&lt;br /&gt;
    :return: list&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    return VIDEOS[category]&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
And now we define the list of categories&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def list_categories():&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Create the list of video categories in the Kodi interface.&lt;br /&gt;
    :return: None&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # Get video categories&lt;br /&gt;
    categories = get_categories()&lt;br /&gt;
    # Create a list for our items.&lt;br /&gt;
    listing = []&lt;br /&gt;
    # Iterate through categories&lt;br /&gt;
    for category in categories:&lt;br /&gt;
        # Create a list item with a text label and a thumbnail image.&lt;br /&gt;
        list_item = xbmcgui.ListItem(label=category, thumbnailImage=VIDEOS[category][0][&#039;thumb&#039;])&lt;br /&gt;
        # Set a fanart image for the list item.&lt;br /&gt;
        # Here we use the same image as the thumbnail for simplicity&#039;s sake.&lt;br /&gt;
        list_item.setProperty(&#039;fanart_image&#039;, VIDEOS[category][0][&#039;thumb&#039;])&lt;br /&gt;
        # Set additional info for the list item.&lt;br /&gt;
        # Here we use a category name for both properties for for simplicity&#039;s sake.&lt;br /&gt;
        # setInfo allows to set various information for an item.&lt;br /&gt;
        # For available properties see the following link:&lt;br /&gt;
        # http://mirrors.xbmc.org/docs/python-docs/15.x-isengard/xbmcgui.html#ListItem-setInfo&lt;br /&gt;
        list_item.setInfo(&#039;video&#039;, {&#039;title&#039;: category, &#039;genre&#039;: category})&lt;br /&gt;
        # Create a URL for the plugin recursive callback.&lt;br /&gt;
        # Example: plugin://plugin.video.example/?action=listing&amp;amp;category=Animals&lt;br /&gt;
        url = &#039;{0}?action=listing&amp;amp;category={1}&#039;.format(__url__, category)&lt;br /&gt;
        # is_folder = True means that this item opens a sub-list of lower level items.&lt;br /&gt;
        is_folder = True&lt;br /&gt;
        # Add our item to the listing as a 3-element tuple.&lt;br /&gt;
        listing.append((url, list_item, is_folder))&lt;br /&gt;
    # Add our listing to Kodi.&lt;br /&gt;
    # Large lists and/or slower systems benefit from adding all items at once via addDirectoryItems&lt;br /&gt;
    # instead of adding one by ove via addDirectoryItem.&lt;br /&gt;
    xbmcplugin.addDirectoryItems(__handle__, listing, len(listing))&lt;br /&gt;
    # Add a sort method for the virtual folder items (alphabetically, ignore articles)&lt;br /&gt;
    xbmcplugin.addSortMethod(__handle__, xbmcplugin.SORT_METHOD_LABEL_IGNORE_THE)&lt;br /&gt;
    # Finish creating a virtual folder.&lt;br /&gt;
    xbmcplugin.endOfDirectory(__handle__)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And here we list the videos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def list_videos(category):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Create the list of playable videos in the Kodi interface.&lt;br /&gt;
    :param category: str&lt;br /&gt;
    :return: None&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # Get the list of videos in the category.&lt;br /&gt;
    videos = get_videos(category)&lt;br /&gt;
    # Create a list for our items.&lt;br /&gt;
    listing = []&lt;br /&gt;
    # Iterate through videos.&lt;br /&gt;
    for video in videos:&lt;br /&gt;
        # Create a list item with a text label and a thumbnail image.&lt;br /&gt;
        list_item = xbmcgui.ListItem(label=video[&#039;name&#039;], thumbnailImage=video[&#039;thumb&#039;])&lt;br /&gt;
        # Set a fanart image for the list item.&lt;br /&gt;
        # Here we use the same image as the thumbnail for simplicity&#039;s sake.&lt;br /&gt;
        list_item.setProperty(&#039;fanart_image&#039;, video[&#039;thumb&#039;])&lt;br /&gt;
        # Set additional info for the list item.&lt;br /&gt;
        list_item.setInfo(&#039;video&#039;, {&#039;title&#039;: video[&#039;name&#039;], &#039;genre&#039;: video[&#039;genre&#039;]})&lt;br /&gt;
        # Set &#039;IsPlayable&#039; property to &#039;true&#039;.&lt;br /&gt;
        # This is mandatory for playable items!&lt;br /&gt;
        list_item.setProperty(&#039;IsPlayable&#039;, &#039;true&#039;)&lt;br /&gt;
        # Create a URL for the plugin recursive callback.&lt;br /&gt;
        # Example: plugin://plugin.video.example/?action=play&amp;amp;video=http://www.vidsplay.com/vids/crab.mp4&lt;br /&gt;
        url = &#039;{0}?action=play&amp;amp;video={1}&#039;.format(__url__, video[&#039;video&#039;])&lt;br /&gt;
        # Add the list item to a virtual Kodi folder.&lt;br /&gt;
        # is_folder = False means that this item won&#039;t open any sub-list.&lt;br /&gt;
        is_folder = False&lt;br /&gt;
        # Add our item to the listing as a 3-element tuple.&lt;br /&gt;
        listing.append((url, list_item, is_folder))&lt;br /&gt;
    # Add our listing to Kodi.&lt;br /&gt;
    # Large lists and/or slower systems benefit from adding all items at once via addDirectoryItems&lt;br /&gt;
    # instead of adding one by ove via addDirectoryItem.&lt;br /&gt;
    xbmcplugin.addDirectoryItems(__handle__, listing, len(listing))&lt;br /&gt;
    # Add a sort method for the virtual folder items (alphabetically, ignore articles)&lt;br /&gt;
    xbmcplugin.addSortMethod(__handle__, xbmcplugin.SORT_METHOD_LABEL_IGNORE_THE)&lt;br /&gt;
    # Finish creating a virtual folder.&lt;br /&gt;
    xbmcplugin.endOfDirectory(__handle__)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we tell Kodi how to find the video path to play the videos&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def play_video(path):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Play a video by the provided path.&lt;br /&gt;
    :param path: str&lt;br /&gt;
    :return: None&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # Create a playable item with a path to play.&lt;br /&gt;
    play_item = xbmcgui.ListItem(path=path)&lt;br /&gt;
    # Pass the item to the Kodi player.&lt;br /&gt;
    xbmcplugin.setResolvedUrl(__handle__, True, listitem=play_item)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the router function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
def router(paramstring):&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    Router function that calls other functions&lt;br /&gt;
    depending on the provided paramstring&lt;br /&gt;
    :param paramstring:&lt;br /&gt;
    :return:&lt;br /&gt;
    &amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
    # Parse a URL-encoded paramstring to the dictionary of&lt;br /&gt;
    # {&amp;lt;parameter&amp;gt;: &amp;lt;value&amp;gt;} elements&lt;br /&gt;
    params = dict(parse_qsl(paramstring[1:]))&lt;br /&gt;
    # Check the parameters passed to the plugin&lt;br /&gt;
    if params:&lt;br /&gt;
        if params[&#039;action&#039;] == &#039;listing&#039;:&lt;br /&gt;
            # Display the list of videos in a provided category.&lt;br /&gt;
            list_videos(params[&#039;category&#039;])&lt;br /&gt;
        elif params[&#039;action&#039;] == &#039;play&#039;:&lt;br /&gt;
            # Play a video from a provided URL.&lt;br /&gt;
            play_video(params[&#039;video&#039;])&lt;br /&gt;
    else:&lt;br /&gt;
        # If the plugin is called from Kodi UI without any parameters,&lt;br /&gt;
        # display the list of video categories&lt;br /&gt;
        list_categories()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Call the router function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    # Call the router function and pass the plugin call parameters to it.&lt;br /&gt;
    router(sys.argv[2])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Changing the code=&lt;br /&gt;
&lt;br /&gt;
Hopefully by now you have managed to run the Add-On, understand the structure and can see what the code can do. Now lets trying changing it a little!&lt;br /&gt;
&lt;br /&gt;
Since we already have the Add-on installed we can go directly to the Kodi userdata folder and edit the python directly. You can also have Kodi open at this time ready to run the Add-on when required. Just switch between your text editor and Kodi any time.&lt;br /&gt;
&lt;br /&gt;
Now open up the main.py file from your userdata folder and lets change what the text says.&lt;br /&gt;
&lt;br /&gt;
                 &#039;Cars&#039;: [{&#039;name&#039;: &#039;Postal Truck&#039;,&lt;br /&gt;
                      &#039;thumb&#039;: &#039;http://www.vidsplay.com/vids/us_postal.jpg&#039;,&lt;br /&gt;
                      &#039;video&#039;: &#039;http://www.vidsplay.com/vids/us_postal.mp4&#039;,&lt;br /&gt;
                      &#039;genre&#039;: &#039;Cars&#039;},&lt;br /&gt;
&lt;br /&gt;
Try changing some of the links to another jpeg file or hosted online video. Also try to change the genre and see how that effects the view in Kodi.&lt;br /&gt;
&lt;br /&gt;
Click save on your text editor and now try running the Add-On inside Kodi. You should see the new video links and navigation right away.&lt;br /&gt;
&lt;br /&gt;
Congratulations! you&#039;ve just played an online video from your very own Video Add-on&lt;br /&gt;
&lt;br /&gt;
=Final Thoughts=&lt;br /&gt;
&lt;br /&gt;
Writing a Video Add-on is actually pretty simple once you get the basic structure correct. You can scrape most online sources with Regex, or host your own videos on the web. You can also play youtube clips or vevo videos using some additional easy to use modules.&lt;br /&gt;
&lt;br /&gt;
If you have any questions about this tutorial, feel free to discuss it on our forums here: http://forum.kodi.tv/showthread.php?tid=248774&lt;br /&gt;
&lt;br /&gt;
=Extra info=&lt;br /&gt;
&lt;br /&gt;
Just a reminder...&lt;br /&gt;
IMPORTANT!!!!!!!   Do not mix tabs and spaces in python&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102723</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102723"/>
		<updated>2015-10-31T11:13:26Z</updated>

		<summary type="html">&lt;p&gt;Takoi: xbmc -&amp;gt; kodi&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for Kodi. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs/ Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons, thumbnails and artwork ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
Kodi also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
info = {&lt;br /&gt;
    &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
    &#039;year&#039;: 1979,&lt;br /&gt;
    &#039;title&#039;: &#039;Alien&#039;,&lt;br /&gt;
}&lt;br /&gt;
li.setInfo(&#039;video&#039;, info)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
video_info = {&lt;br /&gt;
    &#039;codec&#039;: &#039;h264&#039;,&lt;br /&gt;
    &#039;aspect&#039;: 1.78,&lt;br /&gt;
    &#039;width&#039;: 1280,&lt;br /&gt;
    &#039;height&#039;: 720,&lt;br /&gt;
}&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, video_info)&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, {&#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2})&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, {&#039;language&#039;: &#039;en&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102722</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102722"/>
		<updated>2015-10-31T11:11:52Z</updated>

		<summary type="html">&lt;p&gt;Takoi: update documentation links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for XBMC. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs/ Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons, thumbnails and artwork ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
XBMC also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
info = {&lt;br /&gt;
    &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
    &#039;year&#039;: 1979,&lt;br /&gt;
    &#039;title&#039;: &#039;Alien&#039;,&lt;br /&gt;
}&lt;br /&gt;
li.setInfo(&#039;video&#039;, info)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
video_info = {&lt;br /&gt;
    &#039;codec&#039;: &#039;h264&#039;,&lt;br /&gt;
    &#039;aspect&#039;: 1.78,&lt;br /&gt;
    &#039;width&#039;: 1280,&lt;br /&gt;
    &#039;height&#039;: 720,&lt;br /&gt;
}&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, video_info)&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, {&#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2})&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, {&#039;language&#039;: &#039;en&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/16.x-jarvis/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102721</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102721"/>
		<updated>2015-10-31T11:07:26Z</updated>

		<summary type="html">&lt;p&gt;Takoi: improve code formatting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for XBMC. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons, thumbnails and artwork ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
XBMC also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
info = {&lt;br /&gt;
    &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
    &#039;year&#039;: 1979,&lt;br /&gt;
    &#039;title&#039;: &#039;Alien&#039;,&lt;br /&gt;
}&lt;br /&gt;
li.setInfo(&#039;video&#039;, info)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
video_info = {&lt;br /&gt;
    &#039;codec&#039;: &#039;h264&#039;,&lt;br /&gt;
    &#039;aspect&#039;: 1.78,&lt;br /&gt;
    &#039;width&#039;: 1280,&lt;br /&gt;
    &#039;height&#039;: 720,&lt;br /&gt;
}&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, video_info)&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, {&#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2})&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, {&#039;language&#039;: &#039;en&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102720</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102720"/>
		<updated>2015-10-31T11:00:38Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* Icons and thumbnails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for XBMC. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons, thumbnails and artwork ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
XBMC also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.setInfo(&#039;video&#039;, { &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
                      &#039;year&#039;: 1979,&lt;br /&gt;
                      &#039;title&#039;: &#039;Alien&#039; })&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, { &#039;codec&#039;: &#039;h264&#039;, &#039;aspect&#039;: 1.78, &#039;width&#039;: 1280,&lt;br /&gt;
                            &#039;height&#039;: 720, &#039;duration&#039;: 60 })&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, { &#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2 })&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, { &#039;language&#039;: &#039;en&#039; })&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102719</id>
		<title>Audio-video add-on tutorial</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Audio-video_add-on_tutorial&amp;diff=102719"/>
		<updated>2015-10-31T10:59:20Z</updated>

		<summary type="html">&lt;p&gt;Takoi: remove use of deprecated methods&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
This page will outline the basics of creating your first Python add-on for XBMC. It assumes you&#039;re at least familiar with the basics of Python (or at least, programming in general). If not, we recommend visiting the [http://docs.python.org/2/tutorial/ Python tutorial] first, and then returning here.&lt;br /&gt;
&lt;br /&gt;
= Before we get started =&lt;br /&gt;
{{See also|Add-on structure}}&lt;br /&gt;
&lt;br /&gt;
The first step to making an add-on is to put the basic structure in place. Make sure your directory is properly named, e.g. &amp;lt;code&amp;gt;plugin.video.my-addon&amp;lt;/code&amp;gt;, and that you have a properly-constructed &amp;lt;code&amp;gt;[[addon.xml]]&amp;lt;/code&amp;gt; file. Once these are done, you can get started writing the actual code for your add-on!&lt;br /&gt;
&lt;br /&gt;
= Hello, World! =&lt;br /&gt;
&lt;br /&gt;
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let Kodi take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we&#039;ll discuss those later.) Let&#039;s start by looking at an extremely basic example script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
li = xbmcgui.ListItem(&#039;My First Video!&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
While not particularly exciting, this shows the minimal amount of code you need to get an Kodi add-on up and running in Python. First, we get the add-on&#039;s process handle from &amp;lt;code&amp;gt;sys.argv[1]&amp;lt;/code&amp;gt;. We need this to tell Kodi who we are. Next, we tell Kodi that we&#039;re going to show a list of &amp;lt;code&amp;gt;&#039;movies&#039;&amp;lt;/code&amp;gt;. There are other options, like &amp;lt;code&amp;gt;&#039;audio&#039;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&#039;episodes&#039;&amp;lt;/code&amp;gt;; these just change some details of how Kodi presents your add-on.&lt;br /&gt;
&lt;br /&gt;
The most important part is that we create an &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt; with the name and icon we want (&amp;lt;code&amp;gt;&#039;DefaultVideo.png&#039;&amp;lt;/code&amp;gt; comes from the Kodi skin), set it to be a video item, and then add it to the directory. Once we&#039;re done adding items, we need to be sure to call &amp;lt;code&amp;gt;xbmcplugin.endOfDirectory&amp;lt;/code&amp;gt; to let Kodi know we&#039;re done!&lt;br /&gt;
&lt;br /&gt;
= Navigating between pages =&lt;br /&gt;
&lt;br /&gt;
While the first example might be enough for extremely simple add-ons, most add-ons will want to have the ability to navigate between different pages. Most add-ons are designed to imitate a folder hierarchy where opening folder items shows a different list of items, and going &amp;quot;up&amp;quot; returns you to the parent folder.&lt;br /&gt;
&lt;br /&gt;
== Retrieving arguments ==&lt;br /&gt;
&lt;br /&gt;
As we saw in the first example, Kodi passes some arguments to us via &amp;lt;code&amp;gt;sys.argv&amp;lt;/code&amp;gt;. This is important, since it&#039;s what will let us tailor the output on the add-on based on user input. Remember, much like a web site, each folder (or page) in an Kodi add-on is the result of a separate invocation of our script. The arguments available to us are:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; &lt;br /&gt;
! Index !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || The base URL of your add-on, e.g. &amp;lt;code&amp;gt;&#039;plugin://plugin.video.myaddon/&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| 1 || The process handle for this add-on, as a numeric string&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The query string passed to your add-on, e.g. &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;baz=quux&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Of particular interest is &amp;lt;code&amp;gt;sys.argv[2]&amp;lt;/code&amp;gt;, which is what we&#039;ll generally use to show different things in the add-on.&lt;br /&gt;
&lt;br /&gt;
=== Multiple content types ===&lt;br /&gt;
{{See also|Addon.xml#&amp;lt;provides&amp;gt; element}}&lt;br /&gt;
&lt;br /&gt;
If your add-on provides multiple content types, e.g. &amp;lt;code&amp;gt;audio&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;video&amp;lt;/code&amp;gt;, when the user invokes your add-on from the add-on list, Kodi will add a &amp;lt;code&amp;gt;content_type&amp;lt;/code&amp;gt; parameter to your add-on&#039;s query string. For example: &amp;lt;code&amp;gt;&#039;?content_type=audio&#039;&amp;lt;/code&amp;gt;. This will allow you to modify the output depending on what context your add-on was invoked in.&lt;br /&gt;
&lt;br /&gt;
== Passing arguments ==&lt;br /&gt;
&lt;br /&gt;
Now that we know how to retrieve the arguments passed to our add-on, we&#039;ll have to actually pass some along to it. Generally speaking, this involves creating a folder &amp;lt;code&amp;gt;ListItem&amp;lt;/code&amp;gt; with a URL back to your add-on; then the next invocation of the add-on will parse those arguments and do something with them. Let&#039;s look at another brief example that adds some folders to let the user navigate between different pages of the add-on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import urllib&lt;br /&gt;
import urlparse&lt;br /&gt;
import xbmcgui&lt;br /&gt;
import xbmcplugin&lt;br /&gt;
&lt;br /&gt;
base_url = sys.argv[0]&lt;br /&gt;
addon_handle = int(sys.argv[1])&lt;br /&gt;
args = urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&lt;br /&gt;
xbmcplugin.setContent(addon_handle, &#039;movies&#039;)&lt;br /&gt;
&lt;br /&gt;
def build_url(query):&lt;br /&gt;
    return base_url + &#039;?&#039; + urllib.urlencode(query)&lt;br /&gt;
&lt;br /&gt;
mode = args.get(&#039;mode&#039;, None)&lt;br /&gt;
&lt;br /&gt;
if mode is None:&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder One&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder One&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    url = build_url({&#039;mode&#039;: &#039;folder&#039;, &#039;foldername&#039;: &#039;Folder Two&#039;})&lt;br /&gt;
    li = xbmcgui.ListItem(&#039;Folder Two&#039;, iconImage=&#039;DefaultFolder.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url,&lt;br /&gt;
                                listitem=li, isFolder=True)&lt;br /&gt;
&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&lt;br /&gt;
elif mode[0] == &#039;folder&#039;:&lt;br /&gt;
    foldername = args[&#039;foldername&#039;][0]&lt;br /&gt;
    url = &#039;http://localhost/some_video.mkv&#039;&lt;br /&gt;
    li = xbmcgui.ListItem(foldername + &#039; Video&#039;, iconImage=&#039;DefaultVideo.png&#039;)&lt;br /&gt;
    xbmcplugin.addDirectoryItem(handle=addon_handle, url=url, listitem=li)&lt;br /&gt;
    xbmcplugin.endOfDirectory(addon_handle)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, many parts of our code are very similar to the first example. There are a few important additions, however. First, we want to respond to the arguments supplied to our script, so we parse the query string with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
urlparse.parse_qs(sys.argv[2][1:])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We skip the first character, since it&#039;s always &amp;lt;code&amp;gt;&#039;?&#039;&amp;lt;/code&amp;gt;. This will give us a &amp;lt;code&amp;gt;dict&amp;lt;/code&amp;gt; of &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt;s; for example, &amp;lt;code&amp;gt;&#039;?foo=bar&amp;amp;foo=baz&amp;amp;quux=spam&#039;&amp;lt;/code&amp;gt; would be converted to &amp;lt;code&amp;gt;{&#039;foo&#039;: [&#039;bar&#039;, &#039;baz&#039;], &#039;quux&#039;: [&#039;spam&#039;]}&amp;lt;/code&amp;gt;. With this information, we can tailor the output of our add-on to the supplied arguments.&lt;br /&gt;
&lt;br /&gt;
We also need to be able to create links back to our add-on in order to display related pages (e.g. subfolders). We can do this by creating an &amp;lt;code&amp;gt;xbmc.ListItem&amp;lt;/code&amp;gt;, passing &amp;lt;code&amp;gt;isFolder=True&amp;lt;/code&amp;gt;, and setting the URL of the item to point back to our add-on. We create the URL in the helper function &amp;lt;code&amp;gt;build_url()&amp;lt;/code&amp;gt;, which gives us a URL that looks something like:&lt;br /&gt;
&lt;br /&gt;
 plugin://plugin.video.myaddon/?mode=folder&amp;amp;foldername=Folder+One&lt;br /&gt;
&lt;br /&gt;
= Working with user settings =&lt;br /&gt;
{{See also|Add-on settings}}&lt;br /&gt;
&lt;br /&gt;
Your add-on may require some configurable options for the user (e.g. login credentials for a service). These can be stored as settings. To use settings with your add-on, you&#039;ll need to make a file defining the settings in &amp;lt;code&amp;gt;resources/settings.xml&amp;lt;/code&amp;gt;. For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;my_setting&amp;quot; type=&amp;quot;bool&amp;quot; default=&amp;quot;true&amp;quot; label=&amp;quot;My Setting&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will allow the user to open the settings for your add-on and modify this setting as needed. Then, in your add-on, you can retrieve or set this setting with the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon()&lt;br /&gt;
my_setting = my_addon.getSetting(&#039;my_setting&#039;) # returns the string &#039;true&#039; or &#039;false&#039;&lt;br /&gt;
my_addon.setSetting(&#039;my_setting&#039;, &#039;false&#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Showing additional metadata =&lt;br /&gt;
&lt;br /&gt;
We&#039;ve already seen how to show some basic metadata, like the icon image and the type of the item (&amp;lt;code&amp;gt;&#039;video&#039;&amp;lt;/code&amp;gt; in our case). However, there are many more pieces of metadata that Kodi understands, and adding them can make life easier on your users. We&#039;ll take a look at some of the more important ones. You can also find a full list in the [http://mirrors.kodi.tv/docs/python-docs Python documentation] for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem xbmcgui.ListItem]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Icons and thumbnails ==&lt;br /&gt;
&lt;br /&gt;
Our previous examples already showed how to set an icon, but you can also set a thumbnail, fanart (full-screen background images) and other artwork. They can be set with the &amp;lt;code&amp;gt;ListItem.setArt&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li = xbmcgui.ListItem(label=&#039;My video&#039;)&lt;br /&gt;
li.setIconImage(&#039;icon.png&#039;)&lt;br /&gt;
li.setArt({&#039;thumb&#039;: &#039;thumbnail.jpg&#039;, &#039;poster&#039;: &#039;poster.jpg&#039; &#039;fanart&#039;: &#039;fanart.jpg&#039;})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Kodi Isengard and earlier the &#039;icon&#039; type is not available for setArt. You must use &amp;lt;code&amp;gt;ListItem.setIconImage(...)&amp;lt;/code&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;d prefer to show the default fanart from your add-on, you can get the path to that image from the &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcaddon.html#Addon xbmcaddon.Addon]&amp;lt;/code&amp;gt; object:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
my_addon = xbmcaddon.Addon(&#039;plugin.video.myaddon&#039;)&lt;br /&gt;
# ...&lt;br /&gt;
li.setArt({&#039;fanart&#039;: my_addon.getAddonInfo(&#039;fanart&#039;)})&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Info labels ==&lt;br /&gt;
&lt;br /&gt;
XBMC also lets you add useful information about each list item, like the cast, episode number, play count, and duration. The specific fields available depend on whether your list item is video, audio, or a picture. In all cases though, the format is roughly the same. For example, to add info labels to a movie, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.setInfo(&#039;video&#039;, { &#039;genre&#039;: &#039;Horror&#039;,&lt;br /&gt;
                      &#039;year&#039;: 1979,&lt;br /&gt;
                      &#039;title&#039;: &#039;Alien&#039; })&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a full list of the available info labels, consult the documentation for &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-setInfo ListItem.setInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Stream info ==&lt;br /&gt;
&lt;br /&gt;
In addition to metadata about the file&#039;s contents, you can add information about the audio/video streams themselves. For a video, you might do the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addStreamInfo(&#039;video&#039;, { &#039;codec&#039;: &#039;h264&#039;, &#039;aspect&#039;: 1.78, &#039;width&#039;: 1280,&lt;br /&gt;
                            &#039;height&#039;: 720, &#039;duration&#039;: 60 })&lt;br /&gt;
li.addStreamInfo(&#039;audio&#039;, { &#039;codec&#039;: &#039;dts&#039;, &#039;language&#039;: &#039;en&#039;, &#039;channels&#039;: 2 })&lt;br /&gt;
li.addStreamInfo(&#039;subtitle&#039;, { &#039;language&#039;: &#039;en&#039; })&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For complete documentation about this function, see &amp;lt;code&amp;gt;[http://mirrors.kodi.tv/docs/python-docs/12.2-frodo/xbmcgui.html#ListItem-addStreamInfo ListItem.addStreamInfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
= Adding context menus =&lt;br /&gt;
&lt;br /&gt;
In addition to the default action for a list item (e.g. playing the video), your add-on can provide additional actions for an item in the context menu. Note that this only applies to list items in &#039;&#039;your&#039;&#039; add-on. Currently, you&#039;re not able to modify the context menu for movies in the user&#039;s library. To add a context menu item, you need to give it a label and a [[List of built-in functions|built-in function]] as a string:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;),&lt;br /&gt;
                         (&#039;Go up&#039;, &#039;Action(ParentDir)&#039;) ])&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also elect to show &#039;&#039;only&#039;&#039; your context menu items:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
li.addContextMenuItems([ (&#039;Refresh&#039;, &#039;Container.Refresh&#039;) ], replaceItems=True)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=102460</id>
		<title>Archive:Jarvis API changes</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=102460"/>
		<updated>2015-10-20T08:42:45Z</updated>

		<summary type="html">&lt;p&gt;Takoi: remove boilerplate&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Isengard}}&lt;br /&gt;
{{notice|Kodi v15 (Isengard) final was just recently released, so please keep in mind that a v16 (Jarvis) release is still far away into the future. As such, these API changes is a placeholder containing API changes to the current Kodi mainline (the git master tree repository on GitHub). It is a very much a work in progress, this is only listing API changes commited to the master branch after Isengard branching, and many many many APIs are subject to future change.}}&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
{{see also|Kodi v16 (Jarvis) FAQ|Kodi v16 (Jarvis) changelog|Releases}}&lt;br /&gt;
&lt;br /&gt;
=Addons=&lt;br /&gt;
&lt;br /&gt;
== PVR ==&lt;br /&gt;
* Update the PVR Addon API version to 4.0.0 for Kodi v16 (Jarvis)&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7408&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7626&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/8005&amp;lt;/ref&amp;gt;&lt;br /&gt;
==== PVR API ====&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
&lt;br /&gt;
* Changed: ListItem no longer sets media type based on &amp;quot;tvshowtitle&amp;quot;, &amp;quot;episode&amp;quot; and &amp;quot;season&amp;quot; provided via ListItem::setInfo. May affect appearance of info dialog. Use the new &amp;quot;mediatype&amp;quot; info label instead. &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7683&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Removed depricated xbmcgui.lock() and xbmcgui.unlock()&lt;br /&gt;
* Deprecated ListItem.setIconImage, use setArt&lt;br /&gt;
* Deprecated ListItem.setThumbnailImage, use setArt&lt;br /&gt;
* Deprecated &amp;quot;iconImage&amp;quot; and &amp;quot;thumbnailImage&amp;quot; parameters for ListItem, use setArt&lt;br /&gt;
* Added xbmcgui.Dialog.textviewer &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7271&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.ControlFadeLabel.setScrolling &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7454&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.Dialog.multiselect&lt;br /&gt;
* Added ListItem.setContentLookup&lt;br /&gt;
* Added &amp;quot;mediatype&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;userrating&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;icon&amp;quot; support to ListItem.setArt&lt;br /&gt;
&lt;br /&gt;
=Skins=&lt;br /&gt;
See http://forum.kodi.tv/showthread.php?tid=231270&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Development]]&lt;br /&gt;
{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
{{Isengard updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|*]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:J|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=102459</id>
		<title>Archive:Jarvis API changes</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=102459"/>
		<updated>2015-10-20T08:39:05Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Isengard}}&lt;br /&gt;
{{notice|Kodi v15 (Isengard) final was just recently released, so please keep in mind that a v16 (Jarvis) release is still far away into the future. As such, these API changes is a placeholder containing API changes to the current Kodi mainline (the git master tree repository on GitHub). It is a very much a work in progress, this is only listing API changes commited to the master branch after Isengard branching, and many many many APIs are subject to future change.}}&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
{{see also|Kodi v16 (Jarvis) FAQ|Kodi v16 (Jarvis) changelog|Releases}}&lt;br /&gt;
&lt;br /&gt;
=Addons=&lt;br /&gt;
&lt;br /&gt;
== PVR ==&lt;br /&gt;
* Update the PVR Addon API version to 4.0.0 for Kodi v16 (Jarvis)&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7408&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7626&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/8005&amp;lt;/ref&amp;gt;&lt;br /&gt;
==== PVR API ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
&lt;br /&gt;
* Changed: ListItem no longer sets media type based on &amp;quot;tvshowtitle&amp;quot;, &amp;quot;episode&amp;quot; and &amp;quot;season&amp;quot; provided via ListItem::setInfo. May affect appearance of info dialog. Use the new &amp;quot;mediatype&amp;quot; info label instead. &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7683&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Removed depricated xbmcgui.lock() and xbmcgui.unlock()&lt;br /&gt;
* Deprecated ListItem.setIconImage, use setArt&lt;br /&gt;
* Deprecated ListItem.setThumbnailImage, use setArt&lt;br /&gt;
* Deprecated &amp;quot;iconImage&amp;quot; and &amp;quot;thumbnailImage&amp;quot; parameters for ListItem, use setArt&lt;br /&gt;
* Added xbmcgui.Dialog.textviewer &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7271&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.ControlFadeLabel.setScrolling &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7454&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.Dialog.multiselect&lt;br /&gt;
* Added ListItem.setContentLookup&lt;br /&gt;
* Added &amp;quot;mediatype&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;userrating&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;icon&amp;quot; support to ListItem.setArt&lt;br /&gt;
&lt;br /&gt;
== Builtins ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== Changed ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Changes to python path ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= JSON-RPC =&lt;br /&gt;
{{main|JSON-RPC API}}&lt;br /&gt;
==== Changed Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Webserver=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Scrapers=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Screensavers and visualizations=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= Window IDs =&lt;br /&gt;
See [[Window IDs]]&lt;br /&gt;
&lt;br /&gt;
=Skins=&lt;br /&gt;
== Changes to the skinning engine ==&lt;br /&gt;
See http://forum.kodi.tv/showthread.php?tid=231270&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Development]]&lt;br /&gt;
{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
{{Isengard updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|*]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:J|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=100241</id>
		<title>Archive:Jarvis API changes</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=100241"/>
		<updated>2015-08-22T12:33:07Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Isengard}}&lt;br /&gt;
{{notice|Kodi v15 (Isengard) final was just recently released, so please keep in mind that a v16 (Jarvis) release is still far away into the future. As such, these API changes is a placeholder containing API changes to the current Kodi mainline (the git master tree repository on GitHub). It is a very much a work in progress, this is only listing API changes commited to the master branch after Isengard branching, and many many many APIs are subject to future change.}}&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
{{see also|Kodi v16 (Jarvis) FAQ|Kodi v16 (Jarvis) changelog|Releases}}&lt;br /&gt;
&lt;br /&gt;
=Addons=&lt;br /&gt;
&lt;br /&gt;
== PVR ==&lt;br /&gt;
&lt;br /&gt;
==== PVR API ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
* Changed: ListItem no longer sets media type based on &amp;quot;tvshowtitle&amp;quot;, &amp;quot;episode&amp;quot; and &amp;quot;season&amp;quot; provided via ListItem::setInfo. May affect appearance of info dialog. Use the new &amp;quot;mediatype&amp;quot; info label instead. &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7683&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Deprecated ListItem.setIconImage, use setArt&lt;br /&gt;
* Deprecated ListItem.setThumbnailImage, use setArt&lt;br /&gt;
* Deprecated &amp;quot;iconImage&amp;quot; and &amp;quot;thumbnailImage&amp;quot; parameters for ListItem, use setArt&lt;br /&gt;
* Added xbmcgui.Dialog.textviewer &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7271&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.ControlFadeLabel.setScrolling &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7454&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.Dialog.multiselect&lt;br /&gt;
* Added ListItem.setContentLookup&lt;br /&gt;
* Added &amp;quot;mediatype&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;icon&amp;quot;  support to ListItem.setArt&lt;br /&gt;
&lt;br /&gt;
== Builtins ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== Changed ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Changes to python path ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= JSON-RPC =&lt;br /&gt;
{{main|JSON-RPC API}}&lt;br /&gt;
==== Changed Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Webserver=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Scrapers=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Screensavers and visualizations=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= Window IDs =&lt;br /&gt;
See [[Window IDs]]&lt;br /&gt;
&lt;br /&gt;
=Skins=&lt;br /&gt;
== Changes to the skinning engine ==&lt;br /&gt;
See http://forum.kodi.tv/showthread.php?tid=231270&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Development]]&lt;br /&gt;
{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
{{Isengard updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|*]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:J|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=99874</id>
		<title>Archive:Jarvis API changes</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=99874"/>
		<updated>2015-08-15T11:39:07Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Isengard}}&lt;br /&gt;
{{notice|Kodi v15 (Isengard) final was just recently released, so please keep in mind that a v16 (Jarvis) release is still far away into the future. As such, these API changes is a placeholder containing API changes to the current Kodi mainline (the git master tree repository on GitHub). It is a very much a work in progress, this is only listing API changes commited to the master branch after Isengard branching, and many many many APIs are subject to future change.}}&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
{{see also|Kodi v16 (Jarvis) FAQ|Kodi v16 (Jarvis) changelog|Releases}}&lt;br /&gt;
&lt;br /&gt;
=Addons=&lt;br /&gt;
&lt;br /&gt;
== PVR ==&lt;br /&gt;
&lt;br /&gt;
==== PVR API ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
* Changed: ListItem no longer sets media type based on &amp;quot;tvshowtitle&amp;quot;, &amp;quot;episode&amp;quot; and &amp;quot;season&amp;quot; provided via ListItem::setInfo. May affect appearance of info dialog. Use the new &amp;quot;mediatype&amp;quot; info label instead. &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7683&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Deprecated ListItem.setIconImage, use setArt&lt;br /&gt;
* Deprecated ListItem.setThumbnailImage, use setArt&lt;br /&gt;
* Deprecated &amp;quot;iconImage&amp;quot;  and &amp;quot;thumbnailImage&amp;quot; arguments for ListItem, use setArt&lt;br /&gt;
* Added xbmcgui.Dialog.textviewer &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7271&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.ControlFadeLabel.setScrolling &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7454&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added ListItem.setContentLookup&lt;br /&gt;
* Added &amp;quot;mediatype&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;icon&amp;quot;  support to ListItem.setArt&lt;br /&gt;
&lt;br /&gt;
== Builtins ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== Changed ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Changes to python path ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= JSON-RPC =&lt;br /&gt;
{{main|JSON-RPC API}}&lt;br /&gt;
==== Changed Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Webserver=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Scrapers=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Screensavers and visualizations=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= Window IDs =&lt;br /&gt;
See [[Window IDs]]&lt;br /&gt;
&lt;br /&gt;
=Skins=&lt;br /&gt;
== Changes to the skinning engine ==&lt;br /&gt;
See http://forum.kodi.tv/showthread.php?tid=231270&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Development]]&lt;br /&gt;
{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
{{Isengard updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|*]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:J|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=99873</id>
		<title>Archive:Jarvis API changes</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Archive:Jarvis_API_changes&amp;diff=99873"/>
		<updated>2015-08-15T11:38:09Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* Python */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Isengard}}&lt;br /&gt;
{{notice|Kodi v15 (Isengard) final was just recently released, so please keep in mind that a v16 (Jarvis) release is still far away into the future. As such, these API changes is a placeholder containing API changes to the current Kodi mainline (the git master tree repository on GitHub). It is a very much a work in progress, this is only listing API changes commited to the master branch after Isengard branching, and many many many APIs are subject to future change.}}&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
{{see also|Kodi v16 (Jarvis) FAQ|Kodi v16 (Jarvis) changelog|Releases}}&lt;br /&gt;
&lt;br /&gt;
=Addons=&lt;br /&gt;
&lt;br /&gt;
== PVR ==&lt;br /&gt;
&lt;br /&gt;
==== PVR API ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Python ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
&lt;br /&gt;
* Changed: ListItem no longer sets media type based on &amp;quot;tvshowtitle&amp;quot;, &amp;quot;episode&amp;quot; and &amp;quot;season&amp;quot; provided via ListItem::setInfo. May affect appearance of info dialog. Use the new &amp;quot;mediatype&amp;quot; info label instead. &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7683&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Deprecated ListItem.setIconImage, use setArt&lt;br /&gt;
* Deprecated ListItem.setThumbnailImage, use setArt&lt;br /&gt;
* Deprecated &amp;quot;iconImage&amp;quot;  and &amp;quot;thumbnailImage&amp;quot; arguments for ListItem, use setArt&lt;br /&gt;
* Added xbmcgui.Dialog.textviewer &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7271&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added xbmcgui.ControlFadeLabel.setScrolling &amp;lt;ref&amp;gt;https://github.com/xbmc/xbmc/pull/7454&amp;lt;/ref&amp;gt;&lt;br /&gt;
* Added ListItem.setContentLookup&lt;br /&gt;
* Added &amp;quot;mediatype&amp;quot; info label for videos&lt;br /&gt;
* Added &amp;quot;icon&amp;quot;  support to ListItem.setArt&lt;br /&gt;
&lt;br /&gt;
== Builtins ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== Changed ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
== Changes to python path ==&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= JSON-RPC =&lt;br /&gt;
{{main|JSON-RPC API}}&lt;br /&gt;
==== Changed Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
==== New Methods ====&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Webserver=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Scrapers=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
=Screensavers and visualizations=&lt;br /&gt;
{{incomplete}}&lt;br /&gt;
* ?&lt;br /&gt;
&lt;br /&gt;
= Window IDs =&lt;br /&gt;
See [[Window IDs]]&lt;br /&gt;
&lt;br /&gt;
=Skins=&lt;br /&gt;
== Changes to the skinning engine ==&lt;br /&gt;
See http://forum.kodi.tv/showthread.php?tid=231270&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Development]]&lt;br /&gt;
{{Changelogs}}&lt;br /&gt;
&lt;br /&gt;
{{Isengard updated}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development|*]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:J|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on:Extras&amp;diff=99496</id>
		<title>Add-on:Extras</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on:Extras&amp;diff=99496"/>
		<updated>2015-08-11T15:55:25Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Addon &lt;br /&gt;
|Name=Extras&lt;br /&gt;
|provider-name=takoi&lt;br /&gt;
|ID=context.item.extras&lt;br /&gt;
|latest-version=1.0.0&lt;br /&gt;
|extension point=kodi.context.item&lt;br /&gt;
|provides=&lt;br /&gt;
|Summary=Browse extras from the video library&lt;br /&gt;
|Description=This add-on lets you view your movie and TV show extras/special features directly from the library. To access extras, open the context menu on a video in the library and click &#039;Extras&#039;.&lt;br /&gt;
&lt;br /&gt;
By default, the add-on will look in the &amp;quot;.extras&amp;quot; sub-directory for content (can be changed in settings).&lt;br /&gt;
|Platform=all&lt;br /&gt;
|Language=&lt;br /&gt;
|License=GNU GENERAL PUBLIC LICENSE. Version 3, 29 June 2007&lt;br /&gt;
|Forum=&lt;br /&gt;
|Website=&lt;br /&gt;
|Source=https://github.com/tamland/kodi-addon-extras&lt;br /&gt;
|Email=&lt;br /&gt;
|broken=&lt;br /&gt;
|icon url=http://mirrors.kodi.tv/addons/isengard/context.item.extras/icon.png}}&lt;br /&gt;
&lt;br /&gt;
== Preventing extras from being added to library ==&lt;br /&gt;
See [[Set_content_and_scan#Excluding_directories.2Ffolders|Excluding directories/folders]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Isengard add-on repository]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=87601</id>
		<title>Context Item Add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=87601"/>
		<updated>2015-03-05T11:47:25Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Context item add-ons allows the [[context menu]] in Kodi to be extended. Add-ons must provide the &amp;lt;code&amp;gt;kodi.context.item&amp;lt;/code&amp;gt; extension point and a &amp;lt;item&amp;gt; definition. Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;extension point=&amp;quot;kodi.context.item&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;item&amp;gt;&lt;br /&gt;
    &amp;lt;label&amp;gt;Hello World&amp;lt;/label&amp;gt;&lt;br /&gt;
    &amp;lt;visible&amp;gt;!IsEmpty(ListItem.Genre)&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;parent&amp;gt;kodi.core.manage&amp;lt;/parent&amp;gt;&lt;br /&gt;
  &amp;lt;/item&amp;gt;&lt;br /&gt;
&amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;label&amp;gt;: Required. The label to show in the context menu. String or an ID from the language file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;visible&amp;gt;: Required. A [[Conditional visibility|visibility expression]] that determines when the item will be visible in the [[context menu]]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;parent&amp;gt;: Optional. The parent group for the context item. If &amp;quot;kodi.core.manage&amp;quot; the item will be added under the &amp;quot;Manage&amp;quot; sub-menu. If not specified, it will be added to the top level.&lt;br /&gt;
&lt;br /&gt;
It is currently only possible to provide one item per add-on.&lt;br /&gt;
&lt;br /&gt;
{{Note|Before adding a context menu extension to existing add-on, keep in mind that there is limited space in the [[context menu]] and that having multiple extension in and add-on will force the user to have all of them enabled at the same time.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This feature requires at least version 2.20.0 of the Python API, which should be specified in the [[Addon.xml#&amp;lt;requires&amp;gt;]] element:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.20.0&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The item the context menu was opened on can be accessed in python via the &amp;lt;code&amp;gt;sys.listitem&amp;lt;/code&amp;gt; attribute. The attribute is an instance of &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Example python script ==&lt;br /&gt;
&lt;br /&gt;
This example script will display a notification message showing the name of item the context menu was opened on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    message = &amp;quot;Clicked on &#039;%s&#039;&amp;quot; % sys.listitem.getLabel()&lt;br /&gt;
    xbmc.executebuiltin(&amp;quot;Notification(\&amp;quot;Hello context items!\&amp;quot;, \&amp;quot;%s\&amp;quot;)&amp;quot; % message)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=86895</id>
		<title>Context Item Add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Context_Item_Add-ons&amp;diff=86895"/>
		<updated>2015-03-02T15:08:25Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Created page with &amp;quot; Context item add-ons allows the Context menu in Kodi to be extended. Add-ons must provide the &amp;lt;code&amp;gt;kodi.context.item&amp;lt;/code&amp;gt; extension point and a item definition as foll...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Context item add-ons allows the [[Context menu]] in Kodi to be extended. Add-ons must provide the &amp;lt;code&amp;gt;kodi.context.item&amp;lt;/code&amp;gt; extension point and a item definition as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;item&amp;gt;&lt;br /&gt;
  &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;&lt;br /&gt;
  &amp;lt;visible&amp;gt;&amp;lt;/visible&amp;gt;&lt;br /&gt;
  &amp;lt;parent&amp;gt;&amp;lt;/parent&amp;gt;&lt;br /&gt;
&amp;lt;/item&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;label&amp;gt;: Required. The label to show in the context menu. String or an ID from the language file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;visible&amp;gt;: Required. A [[Conditional visibility|visibility expression]] that determines when the item will be visible in the [[context menu]]. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;parent&amp;gt;: Optional. The parent group for the context item. If &amp;quot;kodi.core.manage&amp;quot; the item will be added under the &amp;quot;Manage&amp;quot; sub-menu. If not specified, it will be added to the top level.&lt;br /&gt;
&lt;br /&gt;
It is currently only possible to provide one item per add-on.&lt;br /&gt;
&lt;br /&gt;
{{Note|Before adding a context menu extension to existing add-on, keep in mind that there is limited space in the [[context menu]] and that having multiple extension in and add-on will force the user to have all of them enabled at the same time.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example &amp;lt;code&amp;gt;addon.xml&amp;lt;/code&amp;gt; definition: ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;context.item.hello.world&amp;quot; name=&amp;quot;Hello World&amp;quot; version=&amp;quot;1.0.0&amp;quot; provider-name=&amp;quot;your-name&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.20.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;kodi.context.item&amp;quot; library=&amp;quot;addon.py&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;item&amp;gt;&lt;br /&gt;
      &amp;lt;label&amp;gt;Hello World&amp;lt;/label&amp;gt;&lt;br /&gt;
      &amp;lt;visible&amp;gt;!IsEmpty(ListItem.Genre)&amp;lt;/visible&amp;gt;&lt;br /&gt;
    &amp;lt;/item&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;kodi.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;summary&amp;gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;
    &amp;lt;description&amp;gt;&amp;lt;/description&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example python script: ==&lt;br /&gt;
&lt;br /&gt;
The item the context menu was opened on can be accessed in python via the &amp;lt;code&amp;gt;sys.listitem&amp;lt;code/&amp;gt; attribute. The attribute is an instance of &amp;lt;code&amp;gt;xbmcgui.ListItem&amp;lt;/code&amp;gt;. The following example script will display a notification message showing the name of item:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import sys&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    message = &amp;quot;Clicked on &#039;%s&#039;&amp;quot; % sys.listitem.getLabel()&lt;br /&gt;
    xbmc.executebuiltin(&amp;quot;Notification(\&amp;quot;Hello context items!\&amp;quot;, \&amp;quot;%s\&amp;quot;)&amp;quot; % message)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_settings&amp;diff=84272</id>
		<title>Add-on settings</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_settings&amp;diff=84272"/>
		<updated>2015-01-19T09:25:15Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{see also|Python development}}&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
settings.xml is a XML file that contains the current configuration for the addon and should be placed in the resources direcory. If your addon has&lt;br /&gt;
configurable items that are set by the user, put them here. This file defines what the user sees&lt;br /&gt;
when they click on Addon settings for your addon. You don&#039;t need to do any coding to utilise this functionality.&lt;br /&gt;
The format for the settings file is relatively straightforward as can be seen in the following example:&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;settings&amp;gt;&lt;br /&gt;
    &amp;lt;category label=&amp;quot;32001&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;setting label=&amp;quot;32011&amp;quot; type=&amp;quot;text&amp;quot;   id=&amp;quot;username&amp;quot; default=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;setting label=&amp;quot;32012&amp;quot; type=&amp;quot;text&amp;quot;   id=&amp;quot;password&amp;quot; option=&amp;quot;hidden&amp;quot;  enable=&amp;quot;!eq(-1,)&amp;quot; default=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;setting label=&amp;quot;32053&amp;quot; type=&amp;quot;slider&amp;quot; id=&amp;quot;limit&amp;quot; subsetting=&amp;quot;true&amp;quot; default=&amp;quot;20&amp;quot; range=&amp;quot;5,5,100&amp;quot; option=&amp;quot;int&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;setting type=&amp;quot;sep&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;setting id=&amp;quot;debug&amp;quot; type=&amp;quot;bool&amp;quot; label=&amp;quot;32013&amp;quot; default=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
    &amp;lt;category label=&amp;quot;32010&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;setting label=&amp;quot;32032&amp;quot; type=&amp;quot;action&amp;quot; action=&amp;quot;RunScript(my.addon.id, downloadreport)&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/category&amp;gt;&lt;br /&gt;
&amp;lt;/settings&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You need to supply at least one category element.&lt;br /&gt;
The label attribute of both categories and settings should be the id of a language string in your language files or the one of the main XBMC language file.&lt;br /&gt;
&lt;br /&gt;
== Different types ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Setting type and additional attributes can be one in the following table:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! Description !! Value attribute (value=&amp;quot;&amp;quot;) !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| music ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| video ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| pictures ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| programs ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| local ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Settings can have additional attributes:&#039;&#039;&#039;&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| source=&amp;quot;&amp;quot; || &amp;quot;video&amp;quot;, &amp;quot;music&amp;quot;, &amp;quot;pictures&amp;quot;, &amp;quot;programs&amp;quot;, &amp;quot;files&amp;quot;, &amp;quot;local&amp;quot; or blank.&amp;quot;&amp;lt;br /&amp;gt;if source is blank it will use the type for shares if it is a valid share if not a valid share it will use, both local and network drives.&lt;br /&gt;
|-&lt;br /&gt;
| visible=&amp;quot;&amp;quot; || &amp;quot;true&amp;quot;, &amp;quot;false&amp;quot; or conditional.&amp;quot;&amp;lt;br /&amp;gt;Determines if the setting is displayed in the settings dialog (default = &#039;true&#039;)&amp;quot;&amp;lt;br /&amp;gt;You can also use a conditional statement: visible=&amp;quot;System.HasAddon(plugin.video.youtube)&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| enable=&amp;quot;&amp;quot; || Allows you to determine whether this setting should be shown based on the value of another setting. 3 comparators are available:&amp;quot;&lt;br /&gt;
* eq() Equal to&lt;br /&gt;
* gt() Greater than&lt;br /&gt;
* lt() Less than&lt;br /&gt;
&lt;br /&gt;
You can AND the comparators using the + symbol and negate it using the ! symbol (e.g. !eq() ). Each comparator takes 2 operands:&lt;br /&gt;
* Relative position of setting to compare&lt;br /&gt;
* Value to compare against&lt;br /&gt;
&lt;br /&gt;
Thus if we place settings in our file in this order:&lt;br /&gt;
: myFirst setting&lt;br /&gt;
: mySecondSetting&lt;br /&gt;
: myThirdSetting&lt;br /&gt;
&lt;br /&gt;
for the third setting we might add the option:&amp;lt;br /&amp;gt;&lt;br /&gt;
enable=&amp;quot;gt(-2,3) + lt(-2,10)&amp;quot;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
You can also use a conditional statement: enable=&amp;quot;System.HasAddon(plugin.video.youtube)&amp;quot;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Elements ==&lt;br /&gt;
&lt;br /&gt;
=== Line separators ===&lt;br /&gt;
Line separators add a horizontal separating line between other element. They are purely user-interface elements that do not allow user input and therefore have no meaningful value as a setting.&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;sep&amp;quot; ====&lt;br /&gt;
Shows a horizontal line.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting type=&amp;quot;sep&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;lsep&amp;quot; ====&lt;br /&gt;
Shows a horizontal line with a text.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32032&amp;quot; type=&amp;quot;lsep&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Text input ===&lt;br /&gt;
Text input elements allow a user to input text in various formats. The &amp;quot;label&amp;quot; attribute must contain an id from the language file that indicates which text to display for the input field.&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;text&amp;quot; ====&lt;br /&gt;
Allow a user to enter one line of text.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting.&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* option=&amp;quot;hidden&amp;quot;|&amp;quot;urlencoded&amp;quot; (optional)&lt;br /&gt;
:if set to &amp;quot;hidden&amp;quot;, each characters entered by the user will be obfuscated with an asterisks (&amp;quot;*&amp;quot;), as is usual for entering passwords.&lt;br /&gt;
:if set to &amp;quot;urlencoded&amp;quot;, each non-alphanumeric characters entered by the user will be &amp;quot;escaped&amp;quot; using %XX encoding.&lt;br /&gt;
* default=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32033&amp;quot; type=&amp;quot;text&amp;quot; id=&amp;quot;username&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;username&amp;quot; value=&amp;quot;john.doe&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{Note|Security consideration: when using &amp;lt;nowiki&amp;gt;option=&amp;quot;hidden&amp;quot;&amp;lt;/nowiki&amp;gt;, the value entered by the user is still saved as an unencrypted string value on disk.}}&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;ipaddress&amp;quot; ====&lt;br /&gt;
Allow a user to enter an ip address as text.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting.&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* default=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32035&amp;quot; type=&amp;quot;ipaddress&amp;quot; id=&amp;quot;ipaddress&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;ipaddress&amp;quot; value=&amp;quot;127.0.0.1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Numeric input ===&lt;br /&gt;
Numeric input elements allow a user to enter a number. The &amp;quot;label&amp;quot; attribute must contain an id from the language file that indicates which text to display for the input field.&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;number&amp;quot; ====&lt;br /&gt;
Allows the user to enter an integer using up/down buttons.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting.&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* default=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32036&amp;quot; type=&amp;quot;number&amp;quot; id=&amp;quot;code&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;code&amp;quot; value=&amp;quot;127000&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Python, calling xbmcplugin.getSetting will return the number as a string value, which must be converted to an integer value if needed}}&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;slider&amp;quot; ====&lt;br /&gt;
Allows the user to enter a number using a horizontal sliding bar.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32053&amp;quot; type=&amp;quot;slider&amp;quot; id=&amp;quot;limit&amp;quot; default=&amp;quot;20&amp;quot; range=&amp;quot;5,5,100&amp;quot; option=&amp;quot;int&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32053&amp;quot; type=&amp;quot;slider&amp;quot; id=&amp;quot;limit&amp;quot; default=&amp;quot;20&amp;quot; range=&amp;quot;0,100&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting.&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* &#039;&#039;&#039;range=&amp;quot;&#039;&#039;min&#039;&#039;[,&#039;&#039;step&#039;&#039;],&#039;&#039;max&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - specify the range of valid values.&lt;br /&gt;
* &#039;&#039;&#039;option=&amp;quot;int&amp;quot;|&amp;quot;float&amp;quot;|&amp;quot;percent&amp;quot;&#039;&#039;&#039; (required) - specifies whether to allow the user to choose between integers, floating point numbers or a percentage.&lt;br /&gt;
* default=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string representation of a floating point value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;limit&amp;quot; value=&amp;quot;5.000000&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Python, calling xbmcplugin.getSetting will return a string, which must be converted to an int, float or percentage value if needed}}&lt;br /&gt;
&lt;br /&gt;
=== Boolean input ===&lt;br /&gt;
Boolean input elements allow a user to switch a setting on or off.&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;bool&amp;quot; ====&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* default=&amp;quot;true&amp;quot;|&amp;quot;false&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32033&amp;quot; type=&amp;quot;bool&amp;quot; id=&amp;quot;background&amp;quot; default=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|&amp;quot;true&amp;quot; and &amp;quot;false&amp;quot; are case sensitive!}}&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;background&amp;quot; value=&amp;quot;false&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|In Python, calling xbmcplugin.getSetting will return a string &amp;quot;true&amp;quot; or &amp;quot;false&amp;quot;, which must be converted to a boolean value if needed}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Rotary selector ===&lt;br /&gt;
A rotary selector allows the user to selected from a list of predefined values. &lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;enum&amp;quot; or &amp;quot;labelenum&amp;quot; ====&lt;br /&gt;
Both element types work the same except that the &amp;quot;enum&amp;quot; type will use the index of the chosen value, wheras the &amp;quot;labelenum&amp;quot; will use the actual value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* &#039;&#039;&#039;values=&amp;quot;&#039;&#039;value1&#039;&#039;[|&#039;&#039;value2&#039;&#039;[...]]&amp;quot; - or -&lt;br /&gt;
* &#039;&#039;&#039;lvalues=&amp;quot;&#039;&#039;id1&#039;&#039;[|&#039;&#039;id2&#039;&#039;[...]]&amp;quot; (required):&lt;br /&gt;
: A list of values or language file ids from which the user can choose.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32018&amp;quot; type=&amp;quot;enum&amp;quot; id=&amp;quot;service1&amp;quot; values=&amp;quot;One|Two|Three|Four&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32019&amp;quot; type=&amp;quot;labelenum&amp;quot; id=&amp;quot;service2&amp;quot; values=&amp;quot;One|Two|Three|Four&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32020&amp;quot; type=&amp;quot;labelenum&amp;quot; id=&amp;quot;service3&amp;quot; lvalues=&amp;quot;32021|32022|32023|32024&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Selecting the value &amp;quot;One&amp;quot; will return the int value &amp;quot;0&amp;quot;, selecting the value &amp;quot;Two&amp;quot; will return the int value &amp;quot;1&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
The value entered by the user is saved as a string. For &amp;quot;enum&amp;quot;-type settings the index of the value is saved, starting at 0 for the first value. For &amp;quot;labelenum&amp;quot;-type settings the value is saved or, in case the lvalues attribute is used, the label translated in the language of the user.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;service1&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;service2&amp;quot; value=&amp;quot;One&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;service3&amp;quot; value=&amp;quot;SomethingTranslated&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== File and folder browsing ===&lt;br /&gt;
File and folder browsing elements allow a user to select a file or folder by browsing the local disks or network. You can specify a media type to show only files of the chosen type to the user. The &amp;quot;label&amp;quot; attribute must contain an id from the language file that indicates which text to display for the input field.&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;file&amp;quot;, &amp;quot;audio&amp;quot;, &amp;quot;video&amp;quot;, &amp;quot;image&amp;quot; or &amp;quot;executable&amp;quot; ====&lt;br /&gt;
Allow the user to browse for and select a file. When using type=&amp;quot;audio&amp;quot;, &amp;quot;video&amp;quot;, &amp;quot;image&amp;quot; or &amp;quot;executable&amp;quot;, only files of those types are displayed to the user.&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* value=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional) - the default value.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32033&amp;quot; type=&amp;quot;file&amp;quot; id=&amp;quot;file&amp;quot; value=&amp;quot;path_to_files&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full path to the file selected by the user is saved as a string value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;file&amp;quot; value=&amp;quot;smb://path_to_files/file.ext&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;folder&amp;quot; ====&lt;br /&gt;
Allow the user to browse for and select a folder.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;id=&amp;quot;&#039;&#039;string&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - the name of the setting&lt;br /&gt;
* &#039;&#039;&#039;label=&amp;quot;&#039;&#039;id&#039;&#039;&amp;quot;&#039;&#039;&#039; (required) - an id from the language file that indicates which text to display.&lt;br /&gt;
* source=&amp;quot;auto&amp;quot;|&amp;quot;images&amp;quot;|... (optional, default=&amp;quot;auto&amp;quot;) - select a starting folder for the browse dialog.&amp;lt;!-- There was no additional information on the page when I rewrote it, so I made this assumption - is it correct? What other options are there besides &amp;quot;auto&amp;quot; and &amp;quot;images&amp;quot; --&amp;gt;&lt;br /&gt;
* value=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; (optional, default=&amp;quot;&amp;quot;) - the default value.&lt;br /&gt;
* option=&amp;quot;writeable&amp;quot; (optional, default=&amp;quot;&amp;quot;) - the user can be allowed to create and select new folders by setting this argument.&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32033&amp;quot; type=&amp;quot;folder&amp;quot; id=&amp;quot;folder&amp;quot; source=&amp;quot;auto&amp;quot; option=&amp;quot;writeable&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The full path to the folder selected by the user is saved as a string value on disk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;folder&amp;quot; value=&amp;quot;smb://path_to_files/&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== type=&amp;quot;fileenum&amp;quot; ====&lt;br /&gt;
Display files in a folder as an enum selector.&lt;br /&gt;
&lt;br /&gt;
Example: List sub-folders of the &#039;resources&#039; folder for this add-on in the settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting id=&amp;quot;myenum&amp;quot; type=&amp;quot;fileenum&amp;quot; values=&amp;quot;resources&amp;quot; mask=&amp;quot;/&amp;quot; &amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Extra attributes ====&lt;br /&gt;
&lt;br /&gt;
* mask=&amp;quot;&#039;&#039;value&#039;&#039;&amp;quot; - filter selectable files. Examples: &amp;quot;/&amp;quot; - display only folders. &amp;quot;*.txt&amp;quot; - display only .txt files.&lt;br /&gt;
* option=&amp;quot;hideext&amp;quot; - hide file extensions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Execute action ===&lt;br /&gt;
&lt;br /&gt;
Separator adds a label as separator between other element&lt;br /&gt;
&lt;br /&gt;
Example code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;setting label=&amp;quot;32032&amp;quot; type=&amp;quot;action&amp;quot; action=&amp;quot;RunScript(my.addon.id, downloadreport)&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
List of actions that can be used:&lt;br /&gt;
* [[List of built-in functions]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Attributes:&lt;br /&gt;
* option=&amp;quot;close&amp;quot; (close the settings dialog before executing the action)&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-ons|*]]&lt;br /&gt;
[[Category:Settings]]&lt;br /&gt;
[[Category:Add-on development]]&lt;br /&gt;
[[Category:Skin development]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84087</id>
		<title>Add-on development</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84087"/>
		<updated>2015-01-15T12:50:23Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]}}&lt;br /&gt;
[[File:Wiki logo.png|150px|link=|left]]&lt;br /&gt;
&amp;lt;section begin=&amp;quot;intro&amp;quot; /&amp;gt;This area contains information, tutorials, and links for creating add-ons for XBMC.&amp;lt;section end=&amp;quot;intro&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
----&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; | General&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[About Add-ons]]&lt;br /&gt;
*[[Add-on structure]]&lt;br /&gt;
*[[Add-on settings]]&lt;br /&gt;
*[[Development Tools]]&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Special protocol]]&lt;br /&gt;
*[[Translation System]]&lt;br /&gt;
*[[Python libraries]]&lt;br /&gt;
*[[Add-on unicode paths|Unicode]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Tutorials&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:HelloWorld addon|Hello World]]&lt;br /&gt;
*[[Audio/video add-on tutorial]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:Debug Python Scripts with Eclipse]]&lt;br /&gt;
*[[HOW-TO:Debug python scripts with WinPDB]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Add-on types&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Plugin sources]]&lt;br /&gt;
*[[Script sources|Scripts]]&lt;br /&gt;
*[[Script Subtitles|Subtitle add-ons]]&lt;br /&gt;
*[[Service addons|Service add-ons]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Script lyrics|Lyrics]]&lt;br /&gt;
*[[HOW-TO:Create a repository for add-ons|Repository add-ons]]&lt;br /&gt;
*[[Scrapers]] ([[HOW-TO:Write media scrapers|alt]])&lt;br /&gt;
*[[Skin development|Skins]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Documentation&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[http://mirrors.xbmc.org/docs/python-docs PyDocs]&lt;br /&gt;
*[[JSON-RPC API]]&lt;br /&gt;
*[[Helix API changes]]&lt;br /&gt;
*[[List of built-in functions]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[InfoLabels|List of info labels]]&lt;br /&gt;
*[[Window IDs|List of window IDs]]&lt;br /&gt;
*[[List of boolean conditions]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Publishing&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Add-on rules]]&lt;br /&gt;
*[[Official add-on repository]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Submitting Add-ons]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Python_libraries&amp;diff=84065</id>
		<title>Python libraries</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Python_libraries&amp;diff=84065"/>
		<updated>2015-01-13T18:02:35Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
XBMC Python comes with all the standard modules from Python 2.6 or later. See https://docs.python.org/2.6/library/ for reference.&lt;br /&gt;
&lt;br /&gt;
== Built-in modules ==&lt;br /&gt;
In addition to the standard libraries, XBMC Python uses a handful of custom modules to expose XBMC functionality to Python.&lt;br /&gt;
&lt;br /&gt;
Up to date documentation about these modules can be found at http://mirrors.xbmc.org/docs/python-docs/&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Module&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| xbmc&lt;br /&gt;
| Offers classes and functions that provide information about the media currently playing and that allow manipulation of the media player (such as starting a new song). You can also find system information using the functions available in this library. &lt;br /&gt;
|- &lt;br /&gt;
| xbmcgui&lt;br /&gt;
| Offers classes and functions that manipulate the Graphical User Interface through windows, dialogs, and various control widgets. &lt;br /&gt;
|- &lt;br /&gt;
| xbmcplugin&lt;br /&gt;
| Offers classes and functions that allow a developer to present information through XBMC&#039;s standard menu structure. While plugins don&#039;t have the same flexibility as scripts, they boast significantly quicker development time and a more consistent user experience.&lt;br /&gt;
|- &lt;br /&gt;
| xbmcaddon&lt;br /&gt;
| Offers classes and functions that manipulate the add-on settings, information and localization.&lt;br /&gt;
|- &lt;br /&gt;
| xbmcvfs&lt;br /&gt;
| Offers classes and functions offers acces to the Virtual File Server (VFS) which you can use to manipulate files and folders.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Third-party modules ==&lt;br /&gt;
Numerous python modules are already packages as add-ons that can be imported by other add-on. See [[:Category:Add-on_libraries/modules]] for a list of available modules. To use any of these modules with your add-on, add the relevant line to [[Addon.xml#.3Crequires.3E|Addon.xml]]&lt;br /&gt;
&lt;br /&gt;
== Installing additional modules ==&lt;br /&gt;
Additional modules may be installed by simply adding the module to the root folder of your add-on.&lt;br /&gt;
&lt;br /&gt;
A common way to organized third-party modules that are not part of add-on source code itself, is to add a &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory and place an &amp;lt;code&amp;gt;__init__.py&amp;lt;/code&amp;gt; file and other third-party modules inside it. These modules may then normally be imported using &amp;lt;code&amp;gt;from lib import somemodule&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Python_libraries&amp;diff=84064</id>
		<title>Python libraries</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Python_libraries&amp;diff=84064"/>
		<updated>2015-01-13T17:59:37Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
XBMC Python comes with all the standard modules from Python 2.6 or later. See https://docs.python.org/2.6/library/ for reference.&lt;br /&gt;
&lt;br /&gt;
== Built-in modules ==&lt;br /&gt;
In addition to the standard libraries, XBMC Python uses a handful of custom modules to expose XBMC functionality to Python.&lt;br /&gt;
&lt;br /&gt;
Up to date documentation about these modules can be found at http://mirrors.xbmc.org/docs/python-docs/&lt;br /&gt;
&lt;br /&gt;
{| border=1 cellspacing=0 cellpadding=5&lt;br /&gt;
| &#039;&#039;&#039;Module&#039;&#039;&#039;&lt;br /&gt;
| &#039;&#039;&#039;Description&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
| xbmc&lt;br /&gt;
| Offers classes and functions that provide information about the media currently playing and that allow manipulation of the media player (such as starting a new song). You can also find system information using the functions available in this library. &lt;br /&gt;
|- &lt;br /&gt;
| xbmcgui&lt;br /&gt;
| Offers classes and functions that manipulate the Graphical User Interface through windows, dialogs, and various control widgets. &lt;br /&gt;
|- &lt;br /&gt;
| xbmcplugin&lt;br /&gt;
| Offers classes and functions that allow a developer to present information through XBMC&#039;s standard menu structure. While plugins don&#039;t have the same flexibility as scripts, they boast significantly quicker development time and a more consistent user experience.&lt;br /&gt;
|- &lt;br /&gt;
| xbmcaddon&lt;br /&gt;
| Offers classes and functions that manipulate the add-on settings, information and localization.&lt;br /&gt;
|- &lt;br /&gt;
| xbmcvfs&lt;br /&gt;
| Offers classes and functions offers acces to the Virtual File Server (VFS) which you can use to manipulate files and folders.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Third-party modules ==&lt;br /&gt;
Numerous python modules are already packages as add-ons that can be imported by other add-on. See [[Category:Add-on_libraries/modules]] for a list of available modules. To use any of these modules with your add-on, add the relevant line to [[Addon.xml#.3Crequires.3E|Addon.xml]]&lt;br /&gt;
&lt;br /&gt;
== Installing additional modules ==&lt;br /&gt;
Additional modules may be installed by simply adding the module to the root folder of your add-on.&lt;br /&gt;
&lt;br /&gt;
A common way to organized third-party modules that are not part of add-on source code itself, is to add a &amp;lt;code&amp;gt;lib&amp;lt;/code&amp;gt; directory and place an &amp;lt;code&amp;gt;__init__.py&amp;lt;/code&amp;gt; file and other third-party modules inside it. These modules may then normally be imported using &amp;lt;code&amp;gt;from lib import somemodule&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84063</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84063"/>
		<updated>2015-01-13T17:17:42Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
First fork and clone the relevant [[official add-on repository]]. In this example we use the plugins repo:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:me/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add the git repository where your addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now open a PR on Github.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember to send the PR to the correct branch. If you have pushed to gotham branch, you should request pull to the gotham branch in repo.&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Submitting_Add-ons&amp;diff=84062</id>
		<title>Submitting Add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Submitting_Add-ons&amp;diff=84062"/>
		<updated>2015-01-13T17:13:15Z</updated>

		<summary type="html">&lt;p&gt;Takoi: update link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Compliant Add-on to the XBMC.org Repo ===&lt;br /&gt;
&lt;br /&gt;
After you have read the [[Add-on_rules|repository guidelines]] and made sure your addon is compliant with them, you may begin the submission process using the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Allowed submissions ===&lt;br /&gt;
&lt;br /&gt;
We have restricted the allowed submissions of add-ons to past Kodi versions.&lt;br /&gt;
Several reasons:&lt;br /&gt;
* Kodi code improvements&lt;br /&gt;
* Reduce support load for add-on developers&lt;br /&gt;
* Reduce workload for repository maintainers&lt;br /&gt;
&lt;br /&gt;
Below is a table of on which submissions are allowed to official Kodi repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Allowed add-on submissions&lt;br /&gt;
! codename !! version !! update !! new&lt;br /&gt;
|-&lt;br /&gt;
| Dharma || 10.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Eden || 11.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Frodo || 12.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Gotham || 13.x || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| Helix || 14.x || yes || yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional feature is that we now use combined repositories. So if your add-on is Gotham/Helix compatible, you only need to send it to Gotham repository.&lt;br /&gt;
If it&#039;s only Helix compatible you need to send it to Helix repository.&lt;br /&gt;
This of course requires that the minimal Kodi dependencies are set accordingly.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Which repos are used&lt;br /&gt;
! codename !! version !! repo !! repo !! repo&lt;br /&gt;
|-&lt;br /&gt;
| Dharma || 10.x || Dharma ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Eden || 11.x || Eden || ||&lt;br /&gt;
|-&lt;br /&gt;
| Frodo || 12.x || Frodo || ||&lt;br /&gt;
|-&lt;br /&gt;
| Gotham || 13.x || Frodo || Gotham ||&lt;br /&gt;
|-&lt;br /&gt;
| Helix || 14.x || Frodo || Gotham || Helix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{see also|Addon.xml#Dependency_versions}}&lt;br /&gt;
&lt;br /&gt;
=== The mailing list ===&lt;br /&gt;
We ask that all Add-on authors subscribe to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List].&lt;br /&gt;
This is done for several reasons.&lt;br /&gt;
:* This is where all updates and important information will be announced.&lt;br /&gt;
:* This way we can contact you regarding your add-ons if necessary.&lt;br /&gt;
:* You can see what other devs are requesting to be added so you know if possibly you need to check compatibility of the add-on you depend on.&lt;br /&gt;
:* You may find new and interesting add-ons this way on which you can get inspiration from or may depend on.&lt;br /&gt;
&lt;br /&gt;
After you have subscribed to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] you will be send a conformation e-mail. Be sure to accept this before you can submit to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Mailing List].&lt;br /&gt;
&lt;br /&gt;
All pull requests should be sent to this list so that repository maintainers will be notified that you want to add of update your add-on. They will do a sanity check if all seems ok and you are following the Kodi guidelines for add-ons. If any issues or questions arise they will contact you through the e-mail you registered with.&lt;br /&gt;
Once all checks out fine your add-on is added to repository and you will receive a confirmation e-mail that it is added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tip|To un-subscribe from the mailinglist follow the same link as [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] and there&#039;s the option to unsubscribe at the bottom}}&lt;br /&gt;
&lt;br /&gt;
==== How to submit your add-on and subsequent updates ====&lt;br /&gt;
&lt;br /&gt;
In order to submit your addon, you must send a request that we add or update your add-on to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] (We call this a &amp;quot;pull request.&amp;quot;). Each request will require a version bump in the [[addon.xml]]. We ask that you also keep a [[Add-on_structure#changelog.txt|changelog.txt]] up to date so that users may easily see what has changed. &lt;br /&gt;
&lt;br /&gt;
Note that .xbt files will be generated automatically for skins so you do not include this in your pull request.&lt;br /&gt;
&lt;br /&gt;
There are several ways to request that we add or update your add-on. Please preface threads using the following conventions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [Git Pull]|| Submit a request that we pull from your repo. This should include a url, branch/tag/revision, and the addon to pull. HEAD is NOT a revision.&lt;br /&gt;
|-&lt;br /&gt;
| [SVN Pull]|| Same as [Git Pull]&lt;br /&gt;
|-&lt;br /&gt;
| [Zip Pull]|| By far the least used but still a valid way. Submit a link where the add-on zip can be downloaded from.&lt;br /&gt;
For example you can just give us the link to .zip in your dropbox account. We do not want to download it from a public download site that holds questionable content or is filled with ads.&lt;br /&gt;
|-&lt;br /&gt;
| [Patch]|| Sometimes you may wish to submit a patch to the author for review.&lt;br /&gt;
Under most circumstances we will not merge this directly, it should go to the upstream maintainer first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After you have send it to the mailing list please keep an eye out for any reply from our repository maintainers if there are any remarks or changes needed or a simple confirmation it has been added. Do note it might take some time to process the request.&lt;br /&gt;
&lt;br /&gt;
After it has been added or updated it will be available from the Kodi repository in Kodi itself, on http://addons.xbmc.org/ and on the wiki page http://wiki.xbmc.org/index.php?title=Category:All_add-ons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Please locate you add-on in the root of the git repository. This to make sure we can easily pull the add-on into our repository.&lt;br /&gt;
Example: https://github.com/XBMC-Addons/service.xbmc.versioncheck}}&lt;br /&gt;
&lt;br /&gt;
==== Example e-mail ====&lt;br /&gt;
&lt;br /&gt;
Subject:&lt;br /&gt;
  [Git Pull] my cool plugin&lt;br /&gt;
Body:&lt;br /&gt;
  *addon -   my.cool.plugin&lt;br /&gt;
  *version - 1.1.0&lt;br /&gt;
  *url - git://some.where.git&lt;br /&gt;
  *revision - a241345a&lt;br /&gt;
  *branch - master&lt;br /&gt;
  *xbmc version - helix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|If you want to request multiple add-ons to be added you can just do this in one e-mail as long as you provide the &amp;quot;Body&amp;quot; part each time for every add-on and every Kodi version you want it to be included to. In this case the subject field doesn&#039;t need to contain the add-on name. Do provide the &amp;quot;[Git Pull]&amp;quot; part at least.}}&lt;br /&gt;
&lt;br /&gt;
{{tip|At this moment Frodo/Gotham/Helix combine all repos into one single repo list in Kodi. You only need to do a request for the minimum repo your add-on supports.}}&lt;br /&gt;
&lt;br /&gt;
=== Github ===&lt;br /&gt;
&lt;br /&gt;
Alternatively, add-on updates may be submitted directly to the [[Official add-on repository]] on Github as pull requests. In addition to the [[Add-on_rules|repository guidelines]] the following rules apply when submitting PRs on Github:&lt;br /&gt;
&lt;br /&gt;
* PR should contain one commit only.&lt;br /&gt;
* Commit message should have the format &amp;quot;[addonid] version&amp;quot;. Example: &amp;quot;[my.cool.addon] 1.0.1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
As with mailing list, only PRs from add-on author will be accepted. Patches should be submitted upstream. For an easy way to create PR from your own git repository, see [[HOW-TO: create add-on PRs using Git Subtree Merging]]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Submitting_Add-on_updates_on_Github&amp;diff=84061</id>
		<title>Submitting Add-on updates on Github</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Submitting_Add-on_updates_on_Github&amp;diff=84061"/>
		<updated>2015-01-13T17:12:23Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Takoi moved page Submitting Add-on updates on Github to HOW-TO:Create add-on PRs using Git Subtree Merging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[HOW-TO:Create add-on PRs using Git Subtree Merging]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84060</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84060"/>
		<updated>2015-01-13T17:12:23Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Takoi moved page Submitting Add-on updates on Github to HOW-TO:Create add-on PRs using Git Subtree Merging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now open a PR on Github.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember to send the PR to the correct branch. If you have pushed to gotham branch, you should request pull to the gotham branch in repo.&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84059</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=84059"/>
		<updated>2015-01-13T17:11:42Z</updated>

		<summary type="html">&lt;p&gt;Takoi: moved to  Submitting Add-ons page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now open a PR on Github.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember to send the PR to the correct branch. If you have pushed to gotham branch, you should request pull to the gotham branch in repo.&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Submitting_Add-ons&amp;diff=84058</id>
		<title>Submitting Add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Submitting_Add-ons&amp;diff=84058"/>
		<updated>2015-01-13T17:10:05Z</updated>

		<summary type="html">&lt;p&gt;Takoi: add github notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]|[[Add-on development]]}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Submitting a Compliant Add-on to the XBMC.org Repo ===&lt;br /&gt;
&lt;br /&gt;
After you have read the [[Add-on_rules|repository guidelines]] and made sure your addon is compliant with them, you may begin the submission process using the following steps.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Allowed submissions ===&lt;br /&gt;
&lt;br /&gt;
We have restricted the allowed submissions of add-ons to past Kodi versions.&lt;br /&gt;
Several reasons:&lt;br /&gt;
* Kodi code improvements&lt;br /&gt;
* Reduce support load for add-on developers&lt;br /&gt;
* Reduce workload for repository maintainers&lt;br /&gt;
&lt;br /&gt;
Below is a table of on which submissions are allowed to official Kodi repository.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Allowed add-on submissions&lt;br /&gt;
! codename !! version !! update !! new&lt;br /&gt;
|-&lt;br /&gt;
| Dharma || 10.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Eden || 11.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Frodo || 12.x || no || no&lt;br /&gt;
|-&lt;br /&gt;
| Gotham || 13.x || yes || no&lt;br /&gt;
|-&lt;br /&gt;
| Helix || 14.x || yes || yes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional feature is that we now use combined repositories. So if your add-on is Gotham/Helix compatible, you only need to send it to Gotham repository.&lt;br /&gt;
If it&#039;s only Helix compatible you need to send it to Helix repository.&lt;br /&gt;
This of course requires that the minimal Kodi dependencies are set accordingly.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Which repos are used&lt;br /&gt;
! codename !! version !! repo !! repo !! repo&lt;br /&gt;
|-&lt;br /&gt;
| Dharma || 10.x || Dharma ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Eden || 11.x || Eden || ||&lt;br /&gt;
|-&lt;br /&gt;
| Frodo || 12.x || Frodo || ||&lt;br /&gt;
|-&lt;br /&gt;
| Gotham || 13.x || Frodo || Gotham ||&lt;br /&gt;
|-&lt;br /&gt;
| Helix || 14.x || Frodo || Gotham || Helix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{see also|Addon.xml#Dependency_versions}}&lt;br /&gt;
&lt;br /&gt;
=== The mailing list ===&lt;br /&gt;
We ask that all Add-on authors subscribe to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List].&lt;br /&gt;
This is done for several reasons.&lt;br /&gt;
:* This is where all updates and important information will be announced.&lt;br /&gt;
:* This way we can contact you regarding your add-ons if necessary.&lt;br /&gt;
:* You can see what other devs are requesting to be added so you know if possibly you need to check compatibility of the add-on you depend on.&lt;br /&gt;
:* You may find new and interesting add-ons this way on which you can get inspiration from or may depend on.&lt;br /&gt;
&lt;br /&gt;
After you have subscribed to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] you will be send a conformation e-mail. Be sure to accept this before you can submit to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Mailing List].&lt;br /&gt;
&lt;br /&gt;
All pull requests should be sent to this list so that repository maintainers will be notified that you want to add of update your add-on. They will do a sanity check if all seems ok and you are following the Kodi guidelines for add-ons. If any issues or questions arise they will contact you through the e-mail you registered with.&lt;br /&gt;
Once all checks out fine your add-on is added to repository and you will receive a confirmation e-mail that it is added.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tip|To un-subscribe from the mailinglist follow the same link as [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] and there&#039;s the option to unsubscribe at the bottom}}&lt;br /&gt;
&lt;br /&gt;
==== How to submit your add-on and subsequent updates ====&lt;br /&gt;
&lt;br /&gt;
In order to submit your addon, you must send a request that we add or update your add-on to the [https://lists.sourceforge.net/lists/listinfo/xbmc-addons Add-ons Mailing List] (We call this a &amp;quot;pull request.&amp;quot;). Each request will require a version bump in the [[addon.xml]]. We ask that you also keep a [[Add-on_structure#changelog.txt|changelog.txt]] up to date so that users may easily see what has changed. &lt;br /&gt;
&lt;br /&gt;
Note that .xbt files will be generated automatically for skins so you do not include this in your pull request.&lt;br /&gt;
&lt;br /&gt;
There are several ways to request that we add or update your add-on. Please preface threads using the following conventions:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;prettytable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| [Git Pull]|| Submit a request that we pull from your repo. This should include a url, branch/tag/revision, and the addon to pull. HEAD is NOT a revision.&lt;br /&gt;
|-&lt;br /&gt;
| [SVN Pull]|| Same as [Git Pull]&lt;br /&gt;
|-&lt;br /&gt;
| [Zip Pull]|| By far the least used but still a valid way. Submit a link where the add-on zip can be downloaded from.&lt;br /&gt;
For example you can just give us the link to .zip in your dropbox account. We do not want to download it from a public download site that holds questionable content or is filled with ads.&lt;br /&gt;
|-&lt;br /&gt;
| [Patch]|| Sometimes you may wish to submit a patch to the author for review.&lt;br /&gt;
Under most circumstances we will not merge this directly, it should go to the upstream maintainer first.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After you have send it to the mailing list please keep an eye out for any reply from our repository maintainers if there are any remarks or changes needed or a simple confirmation it has been added. Do note it might take some time to process the request.&lt;br /&gt;
&lt;br /&gt;
After it has been added or updated it will be available from the Kodi repository in Kodi itself, on http://addons.xbmc.org/ and on the wiki page http://wiki.xbmc.org/index.php?title=Category:All_add-ons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Please locate you add-on in the root of the git repository. This to make sure we can easily pull the add-on into our repository.&lt;br /&gt;
Example: https://github.com/XBMC-Addons/service.xbmc.versioncheck}}&lt;br /&gt;
&lt;br /&gt;
==== Example e-mail ====&lt;br /&gt;
&lt;br /&gt;
Subject:&lt;br /&gt;
  [Git Pull] my cool plugin&lt;br /&gt;
Body:&lt;br /&gt;
  *addon -   my.cool.plugin&lt;br /&gt;
  *version - 1.1.0&lt;br /&gt;
  *url - git://some.where.git&lt;br /&gt;
  *revision - a241345a&lt;br /&gt;
  *branch - master&lt;br /&gt;
  *xbmc version - helix&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|If you want to request multiple add-ons to be added you can just do this in one e-mail as long as you provide the &amp;quot;Body&amp;quot; part each time for every add-on and every Kodi version you want it to be included to. In this case the subject field doesn&#039;t need to contain the add-on name. Do provide the &amp;quot;[Git Pull]&amp;quot; part at least.}}&lt;br /&gt;
&lt;br /&gt;
{{tip|At this moment Frodo/Gotham/Helix combine all repos into one single repo list in Kodi. You only need to do a request for the minimum repo your add-on supports.}}&lt;br /&gt;
&lt;br /&gt;
=== Github ===&lt;br /&gt;
&lt;br /&gt;
Alternatively, add-on updates may be submitted directly to the [[Official add-on repository]] on Github as pull requests. In addition to the [[Add-on_rules|repository guidelines]] the following rules apply when submitting PRs on Github:&lt;br /&gt;
&lt;br /&gt;
* PR should contain one commit only.&lt;br /&gt;
* Commit message should have the format &amp;quot;[addonid] version&amp;quot;. Example: &amp;quot;[my.cool.addon] 1.0.1&amp;quot; &lt;br /&gt;
&lt;br /&gt;
As with mailing list, only PRs from add-on author will be accepted. Patches should be submitted upstream. For an easy way to create PR from your own git repository, see [[Submitting_Add-on_updates_on_Github#Example_git_setup_using_Subtree_merging|HOW-TO: create add-on PRs using Git Subtree Merging]]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84057</id>
		<title>Add-on development</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84057"/>
		<updated>2015-01-13T16:30:33Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]}}&lt;br /&gt;
[[File:Wiki logo.png|150px|link=|left]]&lt;br /&gt;
&amp;lt;section begin=&amp;quot;intro&amp;quot; /&amp;gt;This area contains information, tutorials, and links for creating add-ons for XBMC.&amp;lt;section end=&amp;quot;intro&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
----&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; | General&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[About Add-ons]]&lt;br /&gt;
*[[Add-on structure]]&lt;br /&gt;
*[[Add-on settings]]&lt;br /&gt;
*[[Development Tools]]&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Special protocol]]&lt;br /&gt;
*[[Translation System]]&lt;br /&gt;
*[[Python libraries]]&lt;br /&gt;
*[[Add-on unicode paths|Unicode]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Tutorials&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:HelloWorld addon|Hello World]]&lt;br /&gt;
*[[Audio/video add-on tutorial]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:Debug Python Scripts with Eclipse]]&lt;br /&gt;
*[[HOW-TO:Debug python scripts with WinPDB]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Add-on types&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Plugin sources]]&lt;br /&gt;
*[[Script sources|Scripts]]&lt;br /&gt;
*[[Script Subtitles|Subtitle add-ons]]&lt;br /&gt;
*[[Service addons|Service add-ons]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Script lyrics|Lyrics]]&lt;br /&gt;
*[[HOW-TO:Create a repository for add-ons|Repository add-ons]]&lt;br /&gt;
*[[HOW-TO:Write media scrapers|Scrapers]]&lt;br /&gt;
*[[Skin development|Skins]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Documentation&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[http://mirrors.xbmc.org/docs/python-docs PyDocs]&lt;br /&gt;
*[[JSON-RPC API]]&lt;br /&gt;
*[[Helix API changes]]&lt;br /&gt;
*[[List of built-in functions]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[InfoLabels|List of info labels]]&lt;br /&gt;
*[[Window IDs|List of window IDs]]&lt;br /&gt;
*[[List of boolean conditions]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Publishing&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Add-on rules]]&lt;br /&gt;
*[[Official add-on repository]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Submitting Add-ons]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84056</id>
		<title>Add-on development</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Add-on_development&amp;diff=84056"/>
		<updated>2015-01-13T16:28:34Z</updated>

		<summary type="html">&lt;p&gt;Takoi: add more links and remove duplicated/non-development ones. sorry, don&amp;#039;t have time for images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{mininav|[[Development]]}}&lt;br /&gt;
[[File:Wiki logo.png|150px|link=|left]]&lt;br /&gt;
&amp;lt;section begin=&amp;quot;intro&amp;quot; /&amp;gt;This area contains information, tutorials, and links for creating add-ons for XBMC.&amp;lt;section end=&amp;quot;intro&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{-}}&lt;br /&gt;
----&lt;br /&gt;
{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!colspan=&amp;quot;2&amp;quot; | General&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[About Add-ons]]&lt;br /&gt;
*[[Add-on structure]]&lt;br /&gt;
*[[Add-on settings]]&lt;br /&gt;
*[[Development Tools]]&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Special protocol]]&lt;br /&gt;
*[[Translation System]]&lt;br /&gt;
*[[Python libraries]]&lt;br /&gt;
*[[Add-on unicode paths|Unicode]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Tutorials&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:HelloWorld addon]]&lt;br /&gt;
*[[Audio/video add-on tutorial]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[HOW-TO:Debug Python Scripts with Eclipse]]&lt;br /&gt;
*[[HOW-TO:Debug python scripts with WinPDB]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Add-on types&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Plugin sources]]&lt;br /&gt;
*[[Script sources|Scripts]]&lt;br /&gt;
*[[Script Subtitles|Subtitle add-ons]]&lt;br /&gt;
*[[Service addons|Service add-ons]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Script lyrics|Lyrics]]&lt;br /&gt;
*[[HOW-TO:Create a repository for add-ons|Repository add-ons]]&lt;br /&gt;
*[[HOW-TO:Write media scrapers|Scrapers]]&lt;br /&gt;
*[[Skin development|Skins]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Documentation&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[http://mirrors.xbmc.org/docs/python-docs PyDocs]&lt;br /&gt;
*[[JSON-RPC API]]&lt;br /&gt;
*[[Helix API changes]]&lt;br /&gt;
*[[List of built-in functions]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[InfoLabels|List of info labels]]&lt;br /&gt;
*[[Window IDs|List of window IDs]]&lt;br /&gt;
*[[List of boolean conditions]]&lt;br /&gt;
|-&lt;br /&gt;
! colspan=&amp;quot;2&amp;quot; | Publishing&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Add-on rules]]&lt;br /&gt;
*[[Official add-on repository]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
*[[Submitting Add-ons]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Add-on development|*]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82330</id>
		<title>Service add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82330"/>
		<updated>2014-12-14T14:00:37Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Service addons will be automatically started when XBMC starts. These addons must offer the &#039;&#039;&#039;xbmc.service&#039;&#039;&#039; extension point. You can specify when you want your addon to start, using the &#039;&#039;&#039;start&#039;&#039;&#039; tag. If it&#039;s isn&#039;t here, your addon will automatically start after user login. If you want it to start on XBMC startup, you need to set the &#039;&#039;&#039;start&#039;&#039;&#039; tag to &#039;&#039;startup&#039;&#039;. Here&#039;s a typical example of the addon.xml the addon needs to provide:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;service.example&amp;quot;&lt;br /&gt;
       name=&amp;quot;Example service&amp;quot;&lt;br /&gt;
       version=&amp;quot;1.0.0&amp;quot;&lt;br /&gt;
       provider-name=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your addon is meant to be run while XBMC is running, you need to periodically check if XBMC is exiting. The addon is responsible for terminating when XBMC wants to exit. This can be checked by creating a &amp;lt;code&amp;gt;xbmc.Monitor&amp;lt;/code&amp;gt; instance and calling the &amp;lt;code&amp;gt;abortRequested()&amp;lt;/code&amp;gt; method. To wait for this event instead, call &amp;lt;code&amp;gt;waitForAbort()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example service that prints &amp;quot;hello addon!&amp;quot; every 10 second until XBMC exits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import time&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    monitor = xbmc.Monitor()&lt;br /&gt;
    &lt;br /&gt;
    while True:&lt;br /&gt;
        # Sleep/wait for abort for 10 seconds&lt;br /&gt;
        if monitor.waitForAbort(10):&lt;br /&gt;
            # Abort was requested while waiting. We should exit&lt;br /&gt;
            break&lt;br /&gt;
        xbmc.log(&amp;quot;hello addon! %s&amp;quot; % time.time(), level=xbmc.LOGDEBUG)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotham and earlier ==&lt;br /&gt;
&amp;lt;code&amp;gt;abortRequested()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;waitForAbort()&amp;lt;/code&amp;gt; are new in Helix. In Gotham and earlier, use &amp;lt;code&amp;gt;xbmc.sleep&amp;lt;/code&amp;gt; and check the &amp;lt;code&amp;gt;xbmc.abortRequested&amp;lt;/code&amp;gt; attribute periodically.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import xbmc&lt;br /&gt;
 &lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    while True:&lt;br /&gt;
        if xbmc.abortRequested:&lt;br /&gt;
            break&lt;br /&gt;
        # some code&lt;br /&gt;
        xbmc.sleep(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to]]&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82329</id>
		<title>Service add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82329"/>
		<updated>2014-12-14T13:59:56Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Service addons will be automatically started when XBMC starts. These addons must offer the &#039;&#039;&#039;xbmc.service&#039;&#039;&#039; extension point. You can specify when you want your addon to start, using the &#039;&#039;&#039;start&#039;&#039;&#039; tag. If it&#039;s isn&#039;t here, your addon will automatically start after user login. If you want it to start on XBMC startup, you need to set the &#039;&#039;&#039;start&#039;&#039;&#039; tag to &#039;&#039;startup&#039;&#039;. Here&#039;s a typical example of the addon.xml the addon needs to provide:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;service.example&amp;quot;&lt;br /&gt;
       name=&amp;quot;Example service&amp;quot;&lt;br /&gt;
       version=&amp;quot;1.0.0&amp;quot;&lt;br /&gt;
       provider-name=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your addon is meant to be run while XBMC is running, you need to periodically check if XBMC is exiting. The addon is responsible for terminating when XBMC wants to exit. This can be checked by creating a &amp;lt;code&amp;gt;xbmc.Monitor&amp;lt;/code&amp;gt; instance and calling the &amp;lt;code&amp;gt;abortRequested()&amp;lt;/code&amp;gt; method. To wait for this event instead, call &amp;lt;code&amp;gt;waitForAbort()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Example service that prints &amp;quot;hello addon!&amp;quot; every 10 second until XBMC exits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import time&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    monitor = xbmc.Monitor()&lt;br /&gt;
    &lt;br /&gt;
    while True:&lt;br /&gt;
        # Sleep/wait for abort for 10 seconds&lt;br /&gt;
        if monitor.waitForAbort(10):&lt;br /&gt;
            # Abort was requested while waiting. We should exit&lt;br /&gt;
            break&lt;br /&gt;
        xbmc.log(&amp;quot;hello addon! %s&amp;quot; % time.time(), level=xbmc.LOGDEBUG)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotham an earlier ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;abortRequested()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;waitForAbort()&amp;lt;/code&amp;gt; are new in Helix. In Gotham and earlier, use &amp;lt;code&amp;gt;xbmc.sleep&amp;lt;/code&amp;gt; and check the &amp;lt;code&amp;gt;xbmc.abortRequested&amp;lt;/code&amp;gt; attribute periodically.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import xbmc&lt;br /&gt;
 &lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    while True:&lt;br /&gt;
        if xbmc.abortRequested:&lt;br /&gt;
            break&lt;br /&gt;
        # some code&lt;br /&gt;
        xbmc.sleep(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to]]&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82328</id>
		<title>Service add-ons</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=Service_add-ons&amp;diff=82328"/>
		<updated>2014-12-14T13:57:18Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
Service addons will be automatically started when XBMC starts. These addons must offer the &#039;&#039;&#039;xbmc.service&#039;&#039;&#039; extension point. You can specify when you want your addon to start, using the &#039;&#039;&#039;start&#039;&#039;&#039; tag. If it&#039;s isn&#039;t here, your addon will automatically start after user login. If you want it to start on XBMC startup, you need to set the &#039;&#039;&#039;start&#039;&#039;&#039; tag to &#039;&#039;startup&#039;&#039;. Here&#039;s a typical example of the addon.xml the addon needs to provide:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot; standalone=&amp;quot;yes&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;addon id=&amp;quot;service.example&amp;quot;&lt;br /&gt;
       name=&amp;quot;Example service&amp;quot;&lt;br /&gt;
       version=&amp;quot;1.0.0&amp;quot;&lt;br /&gt;
       provider-name=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;requires&amp;gt;&lt;br /&gt;
    &amp;lt;import addon=&amp;quot;xbmc.python&amp;quot; version=&amp;quot;2.1.0&amp;quot;/&amp;gt;&lt;br /&gt;
  &amp;lt;/requires&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.service&amp;quot; library=&amp;quot;service.py&amp;quot; start=&amp;quot;login&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
  &amp;lt;extension point=&amp;quot;xbmc.addon.metadata&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;platform&amp;gt;all&amp;lt;/platform&amp;gt;&lt;br /&gt;
    &amp;lt;summary lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;
  &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/addon&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If your addon is meant to be run while XBMC is running, you need to periodically check if XBMC is exiting. The addon is responsible for terminating when XBMC wants to exit. This can be checked by creating a &#039;&#039;&#039;xbmc.Monitor&#039;&#039;&#039; instance and calling the &amp;lt;code&amp;gt;abortRequested()&amp;lt;/code&amp;gt; method. To wait for this event instead, call &#039;&#039;&#039;waitForAbort()&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
Example service that prints &amp;quot;hello addon!&amp;quot; every 10 second until XBMC exits:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import time&lt;br /&gt;
import xbmc&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    monitor = xbmc.Monitor()&lt;br /&gt;
    &lt;br /&gt;
    while True:&lt;br /&gt;
        # Sleep/wait for abort for 10 seconds&lt;br /&gt;
        if monitor.waitForAbort(10):&lt;br /&gt;
            # Abort was requested while waiting. We should exit&lt;br /&gt;
            break&lt;br /&gt;
        xbmc.log(&amp;quot;hello addon! %s&amp;quot; % time.time(), level=xbmc.LOGDEBUG)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotham an earlier ==&lt;br /&gt;
&#039;&#039;abortRequested()&#039;&#039; and &#039;&#039;waitForAbort()&#039;&#039; are new in Helix. In Gotham, use &#039;&#039;xbmc.sleep&#039;&#039; and check the &#039;&#039;xbmc.abortRequested&#039;&#039; attribute periodically.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import xbmc&lt;br /&gt;
 &lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    while True:&lt;br /&gt;
        if xbmc.abortRequested:&lt;br /&gt;
            break&lt;br /&gt;
        # some code&lt;br /&gt;
        xbmc.sleep(500)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:How-to]]&lt;br /&gt;
[[Category:Add-on development]]&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81943</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81943"/>
		<updated>2014-12-02T10:50:22Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* First time setup */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
General [[Add-on rules]] apply. Additional rules when submitting PRs on Github:&lt;br /&gt;
&lt;br /&gt;
* PR should contain one commit only.&lt;br /&gt;
* Commit message should have the format &amp;quot;[addonid] version&amp;quot;. Example: &amp;quot;[my.cool.addon] 1.0.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As with mailing list, only PRs from add-on author will be accepted. Patches should be submitted upstream.&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can now open a PR on Github.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; Remember to send the PR to the correct branch. If you have pushed to gotham branch, you should request pull to the gotham branch in repo.&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81942</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81942"/>
		<updated>2014-12-02T10:44:33Z</updated>

		<summary type="html">&lt;p&gt;Takoi: /* Guidelines */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
General [[Add-on rules]] apply. Additional rules when submitting PRs on Github:&lt;br /&gt;
&lt;br /&gt;
* PR should contain one commit only.&lt;br /&gt;
* Commit message should have the format &amp;quot;[addonid] version&amp;quot;. Example: &amp;quot;[my.cool.addon] 1.0.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
As with mailing list, only PRs from add-on author will be accepted. Patches should be submitted upstream.&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81923</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81923"/>
		<updated>2014-11-30T14:26:24Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Takoi moved page How to submit add-on and subsequent updates on Github to Submitting Add-on updates on Github: Martijn didn&amp;#039;t like it:(&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81922</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81922"/>
		<updated>2014-11-30T14:22:18Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81921</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81921"/>
		<updated>2014-11-30T14:20:43Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
=== First time setup ===&lt;br /&gt;
&lt;br /&gt;
Clone the XBMC addon repository:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Updating addon to a new version ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git diff --staged&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more info about Subtree Merging see http://git-scm.com/book/en/v1/Git-Tools-Subtree-Merging&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81920</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81920"/>
		<updated>2014-11-30T14:12:56Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, it must first be removed with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pulling Updates ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git diff --staged&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81919</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81919"/>
		<updated>2014-11-30T13:59:47Z</updated>

		<summary type="html">&lt;p&gt;Takoi: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
cd repo-plugins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this example we will use an addon named &amp;quot;myaddon&amp;quot;. Add the git repo where you addon resides as a remote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a new branch for the addon:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current directory should contain the files from the myaddon repository. To switch back to gotham branch of the &amp;quot;repo-plugins&amp;quot; repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If your addon already exist in repo, remove it with:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we use subtree merge to pull myaddon into the gotham branch of repo-plugins: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The see the changes that are about to be committed: &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git diff --staged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then commit the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pulling Updates ===&lt;br /&gt;
&lt;br /&gt;
Updating the addon is now easy. For this example we pull the master branch from myaddon:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon master&lt;br /&gt;
git diff --staged&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
	<entry>
		<id>https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81918</id>
		<title>HOW-TO:Create add-on PRs using Git Subtree Merging</title>
		<link rel="alternate" type="text/html" href="https://kodi.wiki/index.php?title=HOW-TO:Create_add-on_PRs_using_Git_Subtree_Merging&amp;diff=81918"/>
		<updated>2014-11-30T13:32:59Z</updated>

		<summary type="html">&lt;p&gt;Takoi: Created page with &amp;quot;  == Guidelines ==   == Example git setup using Subtree merging ==  &amp;lt;pre&amp;gt; git clone git@github.com:xbmc/repo-plugins.git  git remote add myaddon git@github.com:me/myaddon.git ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
== Guidelines ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example git setup using Subtree merging ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@github.com:xbmc/repo-plugins.git&lt;br /&gt;
&lt;br /&gt;
git remote add myaddon git@github.com:me/myaddon.git&lt;br /&gt;
git fetch myaddon&lt;br /&gt;
&lt;br /&gt;
git checkout -b myaddon_branch myaddon/master&lt;br /&gt;
git checkout gotham&lt;br /&gt;
&lt;br /&gt;
First time setup if your addon already exist in repo:&lt;br /&gt;
git rm -r plugin.my.addon/&lt;br /&gt;
&lt;br /&gt;
git read-tree --prefix=plugin.my.addon/ -u myaddon_branch&lt;br /&gt;
git diff --staged&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.1&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Updates ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git checkout gotham&lt;br /&gt;
git pull --strategy subtree --squash myaddon v1.0.2&lt;br /&gt;
git commit -m &amp;quot;[plugin.my.addon] 1.0.2&amp;quot;&lt;br /&gt;
git push origin gotham&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Takoi</name></author>
	</entry>
</feed>