Montellese / xbmc

Montellese's fork of Kodi
http://kodi.tv
Other
21 stars 6 forks source link

Idea: Allow upstream compatibility for video plugins #70

Open flubshi opened 4 years ago

flubshi commented 4 years ago

A (video) plugin for Kodi adapted for MediaImporter is no longer compatible to upstream Kodi, because the addon.xml contains and additional extension:

<extension point="kodi.mediaimporter" library="importer.py">
   [...]
</extension>

This means, developers need to maintain an additional branch of their plugin for MediaImporter and for rollout maybe an additional repository.

A user cannot simply switch between MediaImporter and Kodi master branch without replacing the addons.

As a temporary workaround, I would suggested to adapt the addon.xml parser to allow upstream compatible addons. This could be implemented by xml comments that were replaced by this branch before addon.xml is parsed. A modified addon.xml could look like this:

<!--mediaimporter
<extension point="kodi.mediaimporter" library="importer.py">
   [...]
</extension>
mediaimporter-->

Such a plugin is upstream compatible, because the invalid extension is an xml comment.

The MediaImporter branch would need to remove all <!--mediaimporter and mediaimporter-->. When the addon.xml is parsed afterwards, the same addon works for this branch as well.

As mentioned before, this would allow addon developers to integrate MediaImporter support in the normal development/master branch. Addons could already be shipped with MediaImporter support.

I am aware that this is a workaround and of course this should not go into the final Kodi pull request when media importer will be added. But it might addon developers and users life easier and might help increasing the number of addons supporting this branch.

What do you think? Are there better ideas to implement this?

Montellese commented 4 years ago

This is only an option if the mainteiners of the Kodi repos would accept add-ons containing media importer logic even though it can't be used yet. So we'd have to check with @ronie or whoever is in charge of the Kodi plugin repository.