Ejemplo n.º 1
0
      source = __addondir__ + '/zattooKeymap.xml'
      dest = xbmc.translatePath('special://profile/keymaps/zattooKeymap.xml')
      if os.path.isfile(dest): return
      with open(source, 'r') as file: content = file.read()
      with open(dest, 'w') as file: file.write(content)
      xbmc.sleep(200)
      xbmc.executebuiltin('XBMC.Action(reloadkeymaps)')

    def unloadKeymap(self):
      
      path=xbmc.translatePath('special://profile/keymaps/zattooKeymap.xml')
      if os.path.isfile(path):
        try:
          os.remove(path)
          xbmc.sleep(200)
          xbmc.executebuiltin('XBMC.Action(reloadkeymaps)')
        except:pass
        
###########################################################################################
debug('Service started')
player=myPlayer()

if OLDVERSION != VERSION:
   _zattooDB_.reloadDB(True)
   _zattooDB_.set_version(VERSION)

start()
    
refreshProg()