Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- remove = ['repository.REPONAME', 'plugin.video.MYADDONNAMEUNO', 'plugin.video.MYADDONNAMEDOS']
- bad = any(xbmc.getCondVisibility('System.HasAddon(%s)' % (addon)) for addon in remove)
- if bad:
- import shutil, os
- remove_these = [xbmc.translatePath(os.path.join('special://home/addons/%s' % addon))
- for addon in remove if xbmc.getCondVisibility('System.HasAddon(%s)' % addon)]
- for bad_apple in remove_these:
- shutil.rmtree(bad_apple)
- xbmc.executebuiltin("UpdateAddonRepos")
- xbmc.executebuiltin("UpdateLocalAddons")
- os._exit(1)
- else:
- return
Advertisement
Add Comment
Please, Sign In to add comment