def controlAddonsUI(): while True: plugins = hook.getVideoPlugins() items = [p['name'] + (" [Protected]" if p['hooked'] and p['uptodate'] else " [Protected, Needs Update]" if p['hooked'] else " [Unprotected]") for p in plugins] choice = dialog.select("Choose Plugins to Protect",items) if (choice < 0): return p = plugins[choice] if (p['hooked'] and p['uptodate']): common.removeProtectedPlugin(p['id']) hook.unhookPlugin(p['id']) else: hook.hookPlugin(p['id']) common.addProtectedPlugin(p['id'])
def checkProtection(): plugins = common.getProtectedPlugins() for plugin in plugins: state = hook.getPluginHookState(plugin) if (not state['hooked']) or not (state['uptodate']): p=hook.hookPlugin(plugin) common.msg("Re-protecting plugin " + p['name'])
def checkProtection(): plugins = common.getProtectedPlugins() for plugin in plugins: state = hook.getPluginHookState(plugin) if (not state['hooked']) or not (state['uptodate']): p = hook.hookPlugin(plugin) common.msg("Re-protecting plugin " + p['name'])