Skip to content

kodi.mediaimporter extension point

Sascha Montellese edited this page Apr 4, 2020 · 9 revisions

The add-on importer provided by Kodi core requires add-ons to implement the kodi.mediaimporter extension point to be able to support media importing. This page describes what an add-on has to provide / implement to become a media importer.

addon.xml

To implement the kodi.mediaimporter extension point an add-on must contain the following definition in addon.xml:

<extension point="kodi.mediaimporter" protocol="<PROTOCOL>" discovery="<DISCOVERY SCRIPT>" library="<IMPORTER SCRIPT>" observer="<OBSERVER SCRIPT>">
    <canlookupprovider>true</canlookupprovider>
    <providersettings>providersettings.xml</providersettings>
    <importsettings>importsettings.xml</importsettings>
</extension>

<extension>

Attribute Description Example
point Must be "kodi.mediaimporter"
protocol Shown to the user when he wants to manually add a provider. Emby
discovery Service script executed to discover and track providers. discovery.py
library Script executed with different actions to import media items. library.py
observer Service script executed to observe registered providers for changes to imported media items. observer.py

<canlookupprovider>

This tag expects a boolean value (true or false) and tells Kodi whether the media importer implementation supports manually looking up providers.

<providersettings>

This tag expects the path to the settings XML file for registered providers.

<importsettings>

This tag expects the path to the settings XML file for registered imports.

Python API

TODO

xbmcmediaimporter module

TODO

MediaProvider

TODO

MediaImport

TODO

Observer

TODO

xbmc module

TODO

ListItem

TODO

Settings

TODO

Discovery service

The discovery service doesn't have to implement any strict interface. It must be written as a service and use xbmc.Monitor to detect when the service must be terminated.

Library script

TODO

Observer service

TODO