Configure repo for Kodi version dependency
#1
Let's say I have a different version of my addon for Kodi 16.1 Jarvis, how would I configure my repo or addon to only install this particular version of the addon on Kodi 16 and force an older version of the addon for 15.2 Isengard?

I have read the info at the link below but I don't fully understand how to implement it. Any hints at all would be greatly appreciated.

http://kodi.wiki/view/Addon.xml#Dependency_versions
Reply
#2
For Jarvis:
<import addon="xbmc.python" version="2.24.0"/>
Reply
#3
That's what I figured but how do I go about implementing this with my repo? I have added the new section to my addons.xml with the new version in my repo but where do I place my new Jarvis only addon now?

Am I stuck with renaming the addon so it can have it's own folder? If so then won't I end up with 2 versions of the addon installed if I already have the old version installed? In my Plugins folder on the repo I have one folder named plugin.video.myaddon.

Can I just change id="plugin.video.myaddon" to "plugin.video.myaddon.16" in the addon.xml and repo addons.xml and name it's folder accordingly? Will it still find the Jarvis only addon this way even though it has the same name as the Isengard version inside the folder?

If you can just point me to a repo with different addon versions for different Kodi builds I'll be able to figure it out.

Thanks for the help membrane!
Reply
#4
He answered a different question than you asked. You need to use <dir> elements w/ different minversion/maxversion attributes in your repository's addons.xml. If you do this then you can keep the same addon id and each kodi version will only see the version for it. The addon.xml for the Jarvis repo is a good reference example: https://github.com/xbmc/xbmc/blob/1bddaf.../addon.xml
Reply
#5
Perfect, thanks tknorris! Just one more question. How to I get the repo to update automatically on all devices?

I upped the version in addon.xml to 1.2, renamed the folder to repository.test-1.2, zipped it up and placed the zip inside the repository.test-1.2 folder and then uploaded it to the server but when I check for updates in Kodi it doesn't detect the new repo version.

Do I need to use an md5 hash in the same way I would for updating addon versions? I don't see anything special in the Jarvis repo that's different from what I have. I'm probably looking in the wrong place though.

Here's the new addon.xml for my repo, let me know if anything is missing for automatic repo updates:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="repository.test" name="My Test Repository" version="1.2" provider-name="Electroid">
    <requires>
        <import addon="xbmc.addon" version="12.0.0"/>
    </requires>
    <extension point="xbmc.addon.repository" name="Test Repo">
        <dir minversion="15.0.0">
            <info compressed="true">http://mysite.com/addons/isengard/addons.xml</info>
            <checksum>http://mysite.com/addons/isengard/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/addons/isengard</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.9.0">
            <info compressed="true">http://mysite.com/addons/jarvis/addons.xml</info>
            <checksum>http://mysite.com/addons/jarvis/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/addons/jarvis</datadir>
            <hashes>true</hashes>
        </dir>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>Test Repository</summary>
        <description>Repo description.</description>
        <platform>all</platform>
    </extension>
</addon>
Reply
#6
In order for people with your repo to get updates to your repo zip, the repo needs to be an addon in your repo just like any other addon.
Reply
#7
Ok the repo is updating now after making it just like an addon but I'm still confused about the directory structure and addons.xml files. It looks like this currently (used Plugins for directory name instead of addons because it was already like that):

/Plugins/
addons.xml
addons.xml.md5

/Plugins/repository.myrepo/
icon.png
changelog.txt
addon.xml
repository.myrepo-1.2.zip

/Plugins/isengard/
addons.xml
addons.xml.md5
plugin.program.test

/Plugins/jarvis/
addons.xml
addons.xml.md5
plugin.program.test

The isengard and jarvis xml files are set up as usual (only difference being version 1.2.0 for isengard and 1.3.0 for jarvis), however when Isengard sees my addon update I get a prompt about the addon being incompatible due to unmet dependencies and it's only seeing the 1.3.0 update which of course will not install because I have the require block <import addon="xbmc.python" version="2.24.0"/> which is for Jarvis only.

When I try to update on Jarvis it attempts to download the correct 1.3.0 Jarvis version from http://mysite.com/Plugins/plugin.program...-1.3.0.zip instead of /Plugins/jarvis/plugin.program.test/plugin.program.test-1.3.0.zip. It also sees the 1.2.0 version if I open Add-on information and click on Update manually.

Should my /Plugins/addons.xml only have the <addon> block for the repo or should it also have blocks for both addon versions as well? I tried putting in the addon blocks for both versions but it still didn't work.

Here are all my addons.xml files (same info inside the individual addon.xml files for the repo and addons of course).

/Plugins/addons.xml:
Code:
<addons>
<addon id="repository.myrepo" name="My Addon Repository" version="1.2" provider-name="Test">
    <requires>
        <import addon="xbmc.addon" version="12.0.0"/>
    </requires>
    <extension point="xbmc.addon.repository" name="My Repo">
        <dir minversion="15.0.0">
            <info compressed="true">http://mysite.com/Plugins/isengard/addons.xml</info>
            <checksum>http://mysite.com/Plugins/isengard/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/isengard</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.9.0">
            <info compressed="true">http://mysite.com/Plugins/jarvis/addons.xml</info>
            <checksum>http://mysite.com/Plugins/jarvis/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/jarvis</datadir>
            <hashes>true</hashes>
        </dir>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>My Addon Repository</summary>
        <description>Description</description>
        <platform>all</platform>
    </extension>
</addon>
</addons>

/Plugins/jarvis/addons.xml:
Code:
<addons>
<addon id="plugin.program.test" name="Test Addon" version="1.3.0" provider-name="Test">
  <requires>
    <import addon="xbmc.python" version="2.24.0"/>
    <import addon="script.module.dateutil" version="2.4.2"/>
  </requires>
  <extension point="xbmc.python.pluginsource" library="default.py">
        <provides>program executable</provides>
  </extension>
  <extension point="xbmc.addon.metadata">
        <summary lang="en">My Test Addon</summary>
        <description lang="en">Description</description>
        <disclaimer lang="en">Disclaimer</disclaimer>
        <forum></forum>
        <source></source>
        <website></website>
        <platform>all</platform>
    </extension>
</addon>
</addons>

/Plugins/isengard/addons.xml:
Code:
<addons>
<addon id="plugin.program.test" name="Test Addon" version="1.2.0" provider-name="Test">
  <requires>
    <import addon="xbmc.python" version="2.20.0"/>
    <import addon="script.module.dateutil" version="2.4.2"/>
  </requires>
  <extension point="xbmc.python.pluginsource" library="default.py">
        <provides>program executable</provides>
  </extension>
  <extension point="xbmc.addon.metadata">
        <summary lang="en">My Test Addon</summary>
        <description lang="en">Description</description>
        <disclaimer lang="en">Disclaimer</disclaimer>
        <forum></forum>
        <source></source>
        <website></website>
        <platform>all</platform>
    </extension>
</addon>
</addons>
Reply
#8
I think your Plugin/addons.xml is off. It should contain all the addons so that the md5 changes when an addon's are updated. Check out my beta repo. I use a <dir> element for a slightly different purpose, but it's similar and should give you an idea of how it should be. I'm not going to link to it here because it might be against the rules, but it's on github under my username.
Reply
#9
Ok I finally got it working. You would think this info would be easier to find. Someone should make a wiki page with the details.

Thanks again for the pointers tknorris. I probably never would have figure this out without your help...

In case anyone else is looking for this info here's what I did.

Repo addon.xml
Code:
<addon id="repository.test" name="Test Repository" version="1.3" provider-name="Electroid">
    <requires>
        <import addon="xbmc.addon" version="12.0.0"/>
    </requires>
    <extension point="xbmc.addon.repository" name="My Repo">
        <dir>
            <info compressed="true">http://mysite.com/Plugins/addons.xml</info>
            <checksum>http://mysite.com/Plugins/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.0.0">
            <info compressed="true">http://mysite.com/Plugins/isengard/addons.xml</info>
            <checksum>http://mysite.com/Plugins/isengard/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/isengard</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.9.0">
            <info compressed="true">http://mysite.com/Plugins/jarvis/addons.xml</info>
            <checksum>http://mysite.com/Plugins/jarvis/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/jarvis</datadir>
            <hashes>true</hashes>
        </dir>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>My Repository</summary>
        <description>Description.</description>
        <platform>all</platform>
    </extension>
</addon>

Plugins/addons.xml
Code:
<addons>
<addon id="repository.test" name="Test Repository" version="1.3" provider-name="Electroid">
    <requires>
        <import addon="xbmc.addon" version="12.0.0"/>
    </requires>
    <extension point="xbmc.addon.repository" name="My Repo">
        <dir>
            <info compressed="true">http://mysite.com/Plugins/addons.xml</info>
            <checksum>http://mysite.com/Plugins/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.0.0">
            <info compressed="true">http://mysite.com/Plugins/isengard/addons.xml</info>
            <checksum>http://mysite.com/Plugins/isengard/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/isengard</datadir>
            <hashes>true</hashes>
        </dir>
        <dir minversion="15.9.0">
            <info compressed="true">http://mysite.com/Plugins/jarvis/addons.xml</info>
            <checksum>http://mysite.com/Plugins/jarvis/addons.xml.md5</checksum>
            <datadir zip="true">http://mysite.com/Plugins/jarvis</datadir>
            <hashes>true</hashes>
        </dir>
    </extension>
    <extension point="xbmc.addon.metadata">
        <summary>My Repository</summary>
        <description>Description.</description>
        <platform>all</platform>
    </extension>
</addon>
</addons>
Reply
#10
I am currently trying to update my repo to use the "minversion" configuration for Krypton, Leia and Matrix. I tried using the following...
xml:

<dir minversion="18.9.0">
<info compressed="false">https://holybid.com/kodi/lattsrepo/master/matrix/addons.xml</info>
<checksum>https://holybid.com/kodi/lattsrepo/master/matrix/addons.xml.md5</checksum>
<datadir zip="true">https://holybid.com/kodi/lattsrepo/master/matrix/</datadir>
</dir>
<dir minversion="17.9.0">
<info compressed="false">https://holybid.com/kodi/lattsrepo/master/leia/addons.xml</info>
<checksum>https://holybid.com/kodi/lattsrepo/master/leia/addons.xml.md5</checksum>
<datadir zip="true">https://holybid.com/kodi/lattsrepo/master/leia/</datadir>
</dir>
<dir minversion="16.9.0">
<info compressed="false">https://holybid.com/kodi/lattsrepo/master/krypton/addons.xml</info>
<checksum>https://holybid.com/kodi/lattsrepo/master/krypton/addons.xml.md5</checksum>
<datadir zip="true">https://holybid.com/kodi/lattsrepo/master/krypton/</datadir>
</dir>
In Matrix I only see add-ons from the matrix datadir, but in Leia I see Krypton and Leia add-ons. Is the info above entered correctly?
Reply

Logout Mark Read Team Forum Stats Members Help
Configure repo for Kodi version dependency1