summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar Jeix <devnull@localhost> 2010-08-13 11:03:44 +0200
committerGravatar Jeix <devnull@localhost> 2010-08-13 11:03:44 +0200
commitb1cc10a0f5ea6c9cb8231c67dd016fe4a2414170 (patch)
treeaf31f7d3c6efb49a2afe905d4971001417299c03 /pyLoadCore.py
parentirchook-xmlrpc fix (diff)
parentimprovements (diff)
downloadpyload-b1cc10a0f5ea6c9cb8231c67dd016fe4a2414170.tar.xz
Merge
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py17
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)