Add-on repositories

From Official Kodi Wiki
Revision as of 03:19, 30 June 2010 by >Theuni (→‎Repository Addon)
Jump to navigation Jump to search

Repositories

Beginning with Dharma, XBMC 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 "main" repository that is the default, and additional ones may be added by the user. The Official xbmc.org Repository is included with XBMC by default and is maintained by the XBMC team.

Ingredients for a Repository

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:

  • An HTTP server. Any should work.
  • Some addons.
  • A master xml file. This file contains metadata about all available add-ons.
  • (Optional) A checksum of the above file.
  • A repo addon for distribution. This allows you to share your repo with others.

Directory Structure

 root
 addons.xml
    addon.name
       addon.name-x.y.z.zip
       changelog-x.y.z.zip
       fanart.jpg
       icon.png
    addon2.name
       addon2.name-x.y.z.zip
       changelog-x.y.z.zip
       fanart.jpg
       icon.png
  • addons.xml is the file listed in the <info> section of the addon.
  • addon.name should be the same as the addon's <id>, which is expected to be unique.
  • x.y.z is the addon's version, the same should be listed in its <version> tag.


Addons.xml

XBMC expects to fetch a master xml file that contains the information for each addon inside the repo. This file is named addons.xml and should be at the root of the repository. This file merely encapsulates ther other addon.xml files in an <addons> tag. See below for the basic structure:

<?xml version="1.0" encoding="UTF-8"?>
<addons>
  <addon
    id="sample.addon1"
    ...
  </addon>

  <addon
    id="sample.addon2"
    ...
  </addon>
</addons>

Repository Addon

Repositories are distributed just like any other add-on. In order for you to browse one in XBMC, you'll need to create an add-on and install it. See the xbmc.org addon.xml below for reference:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.xbmc.org"
                name="XBMC.org Add-ons"
                version="1.0.0"
                provider-name="Team XBMC">
        <extension point="xbmc.addon.repository"
                name="Official XBMC.org Add-on Repository">
                <info compressed="true">http://mirrors.xbmc.org/addons/dharma-pre/addons.xml</info>
                <checksum>http://mirrors.xbmc.org/addons/dharma-pre/addons.xml.md5</checksum>
                <datadir zip="true">http://mirrors.xbmc.org/addons/dharma-pre</datadir>
        </extension>
        <extension point="xbmc.addon.metadata">
                <summary>Install Add-ons from XBMC.org</summary>
                <summary lang="es">Instalar Addons desde XBMC.org</summary>
                <description>Download and install add-ons from the Official XBMC.org addon repository.[CR]  By using the official Repository you will be able to take advantage of our extensive file mirror service to help get you faster downloads from a region close to you.[CR]  All addons on this repository have under gone basic testing, if you find a broken or not working addon please report it to Team XBMC so we can take any action needed.</description>
                <description lang="es">Descarga e instala Addons desde el repositorio oficial de XBMC.[CR]  Usando el repositorio oficial tendrás las ventajas de nuestro servicio de mirrors para ayudarte a conseguir unas descargas más rápidas de un sitio cercano a ti.[CR]  Todos los Addons en este repositorio han pasado por un periodo de pruebas básico, pero si encuentras algun addon que no funcione, por favor informa de ello al equipo de XBMC para que se pueda arreglar el fallo.</description>
                <disclaimer>Team XBMC did not make all the add-ons on this repository and are not responsible for their content</disclaimer>
                <disclaimer lang="es">El equipo de XBMC no ha hecho todos los Addons en este repositorio y por consecuente no són responsables de su contenido</disclaimer>
                <platform>all</platform>
        </extension>
</addon>

<info>

  • info - path to the main xml file
  • Compressed - whether or not the xml should be fetched with compression enabled
  • datadir - path to the rootdir for addons
  • zip - whether or not each addon is zipped
  • checksum - whether or not the main xml should be verified against a checksum file of the same name (eg addon.xml.md5)