diff options
-rw-r--r-- | module/Api.py | 2 | ||||
-rw-r--r-- | module/plugins/PluginManager.py | 9 | ||||
-rw-r--r-- | module/setup.py | 4 |
3 files changed, 5 insertions, 10 deletions
diff --git a/module/Api.py b/module/Api.py index f6375f266..99fb4c1e7 100644 --- a/module/Api.py +++ b/module/Api.py @@ -862,7 +862,7 @@ class Api(Iface): :return: list """ - return self.core.pluginManager.getAccountPlugins() + return self.core.pluginManager.getPlugins("account").keys() @permission(PERMS.ACCOUNTS) def updateAccount(self, plugin, account, password=None, options={}): diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py index 5c31930a5..18dea7699 100644 --- a/module/plugins/PluginManager.py +++ b/module/plugins/PluginManager.py @@ -309,18 +309,13 @@ class PluginManager: module = self.loadModule(type, name) if module: return getattr(module, name) - def hasAccountPlugin(self, plugin): - return plugin in self.plugins["accounts"] - - def getAccountPlugins(self): - """return list of account plugin names""" - return self.plugins["accounts"].keys() - def injectPlugin(self, type, name, module, new_name): + """ Overwrite a plugin with a other module. used by Multihoster """ self.modules[(type, name)] = module self.names[(type, name)] = new_name def restoreState(self, type, name): + """ Restore the state of a plugin after injecting """ if (type, name) in self.modules: del self.modules[(type, name)] if (type, name) in self.names: diff --git a/module/setup.py b/module/setup.py index f90afe23a..9af4a5159 100644 --- a/module/setup.py +++ b/module/setup.py @@ -41,7 +41,7 @@ class Setup(): self.stdin_encoding = get_console_encoding(sys.stdin.encoding) def start(self): - langs = self.config.getMetaData("general", "language")["type"].split(";") + langs = self.config.getMetaData("general", "language").type.split(";") lang = self.ask(u"Choose your Language / Wähle deine Sprache", "en", langs) gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) translation = gettext.translation("setup", join(self.path, "locale"), languages=[lang, "en"], fallback=True) @@ -288,7 +288,7 @@ class Setup(): print "" langs = self.config.getMetaData("general", "language") - self.config["general"]["language"] = self.ask(_("Language"), "en", langs["type"].split(";")) + self.config["general"]["language"] = self.ask(_("Language"), "en", langs.type.split(";")) self.config["general"]["download_folder"] = self.ask(_("Downloadfolder"), "Downloads") self.config["download"]["max_downloads"] = self.ask(_("Max parallel downloads"), "3") |