diff options
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py index 8dc725ca7..cc9480dee 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -64,6 +64,7 @@ import module.remote.SecureXMLRPCServer as Server from module.web.ServerThread import WebServer from module.FileDatabase import PyFile + class Core(object): """ pyLoad Core """ @@ -71,7 +72,6 @@ class Core(object): self.doDebug = False self.arg_links = [] - if len(argv) > 1: try: options, args = getopt(argv[1:], 'vca:hdus:', ["version", "clear", "add=", "help", "debug", "user", "setup", "configdir="]) @@ -156,7 +156,6 @@ class Core(object): s.start() exit() - self.config = ConfigParser() translation = gettext.translation("pyLoad", self.path("locale"), languages=["en", self.config['general']['language']]) @@ -214,7 +213,7 @@ class Core(object): self.init_server() self.init_webserver() - linkFile = self.config['general']['link_file'] + #linkFile = self.config['general']['link_file'] freeSpace = self.freeSpace() if freeSpace > 5 * 1024: @@ -613,20 +612,18 @@ class ServerMethods(): return self.core.pullManager.getEvents(uuid) def get_accounts(self): - plugins = self.core.pluginManager.getAccountPlugins() - data = [] + plugins = self.core.accountManager.getAccountPlugins() + data = {} for p in plugins: - data.extend(p.getAllAccounts()) + data[p.__name__] = p.getAllAccounts() return data def update_account(self, plugin, account, password, options=[]): """ create and update account """ - plugins = self.core.pluginManager.getAccountPlugins() - self.core.pluginManager.updateAccount(plugin, account, password, options) + self.core.accountManager.updateAccount(plugin, account, password, options) def remove_account(self, plugin, account): - plugins = self.core.pluginManager.getAccountPlugins() - self.core.pluginManager.removeAccount(plugin, account) + self.core.accountManager.removeAccount(plugin, account) def set_priority(self, id, priority): p = self.core.files.getPackage(id) |