Kodi Community Forum
Can you help me fix my add-on? (Dependencies not met) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Program Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=151)
+---- Thread: Can you help me fix my add-on? (Dependencies not met) (/showthread.php?tid=198789)



Can you help me fix my add-on? (Dependencies not met) - Gatorfreak - 2014-06-27

I was running Frodo. Did a fresh install of Openelec 4.06 (XBMC Gotham) and my plugin that I made won't install. It says "dependencies not met". Maybe someone can tell me what I need to change? Or do I have to do a complete rewrite? It's a very simple add-on that just resumes what was playing before power was cut off. It's been a long time since I had to mess with it.

Code:
import os
import xbmc
import xbmcaddon
from time import sleep


ADDON = xbmcaddon.Addon()
ADDON_ID = ADDON.getAddonInfo('id')
FOLDER = ADDON.getSetting('autoresume.save.folder').encode('utf-8', 'ignore')
FREQUENCY = int(ADDON.getSetting('autoresume.frequency'))
PATH = os.path.join(FOLDER, 'autoresume.txt')

def resume():
  for x in range(0,120):
    if os.path.exists(FOLDER):
      if os.path.exists(PATH):
        # Read from autoresume.txt.
        f = open(PATH, 'r')
        mediaFile = f.readline().rstrip('\n')
        position = float(f.readline())
        f.close()
        # Play file.
        xbmc.Player().play(mediaFile)
        # Seek to last recorded position.
        xbmc.Player().seekTime(position)
      break
    else:
      # If the folder didn't exist maybe we need to wait longer for the drive to be mounted.
      sleep(5)

def recordPosition():
  if xbmc.Player().isPlaying():
    mediaFile = xbmc.Player().getPlayingFile()
    position = xbmc.Player().getTime()
    # Write info to file
    f = open(PATH, 'w')
    f.write(mediaFile)
    f.write('\n')
    f.write(repr(position))
    f.close()
  else:
    if os.path.exists(PATH):
      os.remove(PATH)

def log(msg):
  xbmc.log("%s: %s" % (ADDON_ID, msg), xbmc.LOGDEBUG)


if __name__ == "__main__":
  resume()
  while (not xbmc.abortRequested):
    recordPosition()
    sleep(FREQUENCY)



RE: Can you help me fix my add-on? (Dependencies not met) - Gatorfreak - 2014-06-27

Figured it out. In the addon.xml file I had to change the python version from "2.0" to "2.1.0".

Code:
<import addon="xbmc.python" version="2.1.0"/>



RE: Can you help me fix my add-on? (Dependencies not met) - pkscout - 2014-06-28

Glad you fixed it. In case anyone stumbles on this, here's a link to all the python dependency requirements for the various versions of XBMC.

http://wiki.xbmc.org/index.php?title=addon.xml#Dependency_versions


RE: Can you help me fix my add-on? (Dependencies not met) - terrandroid - 2015-02-22

Hello,
i am new to this, i have kodi 14.1 and when i'm trying to install an addon i have the exact the same problem "dependencies not met". Also when i try to add an repository i can not find it back when i try too install it trough zip inside kodi. I have no idea what too do. Im sorry if im not in the right section For this issue.