Thread Rating:
  • 1 Vote(s) - 5 Average
Solved Issue - repo structure for multiple Kodi versions of the same addon?
#1
How do you structure a repo when you have to deal with versions for different versions of Kodi, preferably zips?

I need to host versions of an addon for Jarvis and Krypton+.
Reply
#2
If you need to provide different versions of an add-on depending on Kodi version, you need to create multiple repositories.
Reply
#3
Exclamation 
(2017-03-23, 21:41)Rechi Wrote: If you need to provide different versions of an add-on depending on Kodi version, you need to create multiple repositories.

Thanks. I think that's how Kodi likes to do it now but I found an answer here:
http://forum.kodi.tv/showthread.php?tid=273588&
The trick is to use different dir tags with the minversion attribute selecting the Kodi version.
Reply
#4
I'd create different branches under the same repository keeping master for latest development... remember to change addon.xml to match new url.


Reply
#5
I use this approach in my repo:

https://github.com/gade01/repository.gad.../addon.xml

That's very useful for skins, where there is a different version for each Kodi version.
Reply
#6
(2017-03-25, 20:40)Gade Wrote: I use this approach in my repo:

https://github.com/gade01/repository.gad.../addon.xml

That's very useful for skins, where there is a different version for each Kodi version.

Thanks. Do you know if Kodi is planning to prevent the multiple separate directory method in the future?

Later versions of the official repo addon.xml only have one release in them
https://github.com/xbmc/xbmc/blob/master.../addon.xml
whereas before they allowed multiple versions
https://github.com/xbmc/xbmc/blob/1bddaf.../addon.xml
Reply
#7
(2017-03-25, 20:50)primaeval Wrote: Do you know if Kodi is planning to prevent the multiple separate directory method in the future?

Later versions of the official repo addon.xml only have one release in them
https://github.com/xbmc/xbmc/blob/master.../addon.xml
whereas before they allowed multiple versions
https://github.com/xbmc/xbmc/blob/1bddaf.../addon.xml

I hope not. Wink

There were a PR for Kodi Krypton to remove this approach and cleanup repos, but it was partially reverted as too many repos used it.

https://github.com/xbmc/xbmc/pull/10059

https://github.com/xbmc/xbmc/pull/10135
Reply
#8
(2017-03-25, 23:52)Gade Wrote:
(2017-03-25, 20:50)primaeval Wrote: Do you know if Kodi is planning to prevent the multiple separate directory method in the future?

Later versions of the official repo addon.xml only have one release in them
https://github.com/xbmc/xbmc/blob/master.../addon.xml
whereas before they allowed multiple versions
https://github.com/xbmc/xbmc/blob/1bddaf.../addon.xml

I hope not. Wink

There were a PR for Kodi Krypton to remove this approach and cleanup repos, but it was partially reverted as too many repos used it.

https://github.com/xbmc/xbmc/pull/10059

https://github.com/xbmc/xbmc/pull/10135

Wow. That was controversial. Wink I'm glad the saner devs won. Smile

It would be good if this was documented in the repo wiki though.
Reply
#9
Well, the wiki is open for everyone to edit. Wink
Reply
#10
(2017-03-26, 09:25)Gade Wrote: Well, the wiki is open for everyone to edit. Wink

I've requested a wiki account. Here is my proposed change. What do you think?
Add-on_repositories (wiki)

4.4 Multiple Kodi Versions

To support multiple Kodi versions from the same repository add seperate directories for each version of addon you need to support, specifying a minversion for that folder.
For example:
Code:
    <extension point="xbmc.addon.repository"
        name="Official XBMC.org Add-on Repository">
        <dir minversion="16.0.0">
            <info compressed="true">http://mirrors.kodi.tv/addons/jarvis/addons.xml</info>
            <checksum>http://mirrors.kodi.tv/addons/jarvis/addons.xml.md5</checksum>
            <datadir zip="true">http://mirrors.kodi.tv/addons/jarvis</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="17.0.0">
            <info compressed="true">http://mirrors.kodi.tv/addons/krypton/addons.xml</info>
            <checksum>http://mirrors.kodi.tv/addons/krypton/addons.xml.md5</checksum>
            <datadir zip="true">http://mirrors.kodi.tv/addons/krypton</datadir>
            <hashes>true</hashes>
        </dir>
</extension>

Add your addon to the directory of the lowest version that it will be compatible with. Use a higher version number for later Kodi versions.
Each directory needs it's own addons.xml and addons.xml.md5 folder for the addons in that directory.
Reply
#11
That's a great idea.

Remember:
Code:
<requires>
    <import addon="xbmc.addon" version="12.0.0"/>
</requires>

Maybe write the complete addon.xml file?

And would it be helpful with a directory example? Something like:

/jarvis/addons.xml
/jarvis/addons.xml.md5
/jarvis/my.cool.addon/addon.xml
/jarvis/my.cool.addon/my.cool.addon-1.0.0.zip
/krypton/addons.xml
/krypton/addons.xml.md5
/krypton/my.cool.addon/addon.xml
/krypton/my.cool.addon/my.cool.addon-2.0.0.zip
Reply



repo structure for multiple Kodi versions of the same addon?51