Kodi Community Forum

Full Version: Requires another addon
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to require another addon that is not in my repo and have the required addon automatically installed?
Yes.
Code:
<import addon="script.module.something" version="1.0.0"/>
The add-on has to be available in a repo.
Yes. You'll need to include the required add-on in your addon.xml file. See section 1.2.1 for examples.
I'm still getting an "incompatible" message on my addon. I'm trying to include a third party addon that is available in their repo which is installed on the system. If I copy their addon into my own repo it automatically installs it. Am I missing something? Or is this not possible?
Here's my xml

Code:
<?xml version='1.0' encoding='utf-8'?>
<addon id="my.addon" name="My Addon" provider-name="me" version="1.00">
  <requires>
    <import addon="service.cronxbmc" version="0.0.4" />
  </requires>

  <extension library="default.py" point="xbmc.python.script">
    <provides>executable</provides>
  </extension>

  <extension library="lib" point="xbmc.python.module" />

  <extension point="xbmc.addon.metadata">
    <platform>all</platform>
    <summary lang="en">Summary</summary>
    <description lang="en">Description</description>
    <license>GNU General Public License, v2</license>
    <language />
    <forum />
    <source />
    <email />
  </extension>
</addon>
It seems as though the required addon's repo has to be installed prior to my own repo, even the 'check updates' button doesn't resolve this.
One repo should never auto install a second one, on simple security grounds.
(2016-05-16, 20:17)DarrenHill Wrote: [ -> ]One repo should never auto install a second one, on simple security grounds.

I agree, however that's not the issue, here is the sequence of events that occur in my situ:

Install my repo
From my repo, install another repo with an addon that is required for my addon
Try to install my addon from my repo that requires the addon installed above ^
Unfortunately this fails because my repo was installed before the other repo and so Kodi thinks the required addon isn't available.

If I install their repo first, then my repo, Kodi will download and automatically install the required addon from the other repo.
Strange, it seems to be working now, I think the issue was because I had installed and uninstalled the repo's and addons, and didn't restart Kodi (on OpenElec).
I had a similar issue with my addon (BerryFlash) that requires parsedom: If I try to install my addon on a virgin Kodi, it fails to install. If I browse through (kind of 'activate') the Kodi repository first, installation works like a charm. It seems that just clicking into the Kodi repo activated parsedom... So, did you try first to install on a virgin system? Did you ever browse through the Kodi repo before you try to install your addon?
Yep it was a fresh install.
Good to know, that seems to be a general issue on fresh installs. I was a bit bewildered first before I figured out what to do.
If you click 'check for updates' it initialises the repo's