summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-22 23:45:38 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-12-22 23:45:38 +0100
commit958bf611f5d9d117f19f824990ec6fd6b537e967 (patch)
tree558cb45fa61b1738629dff9727c028badccd9990 /module/Api.py
parentsome bugfixes (diff)
downloadpyload-958bf611f5d9d117f19f824990ec6fd6b537e967.tar.xz
accountmanager v2, delete your accounts.conf and re-enter them in pyload,
new nice debug functions, try core.shell() and core.breakpoint()
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/module/Api.py b/module/Api.py
index c787819e2..f6375f266 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -849,12 +849,11 @@ class Api(Iface):
:param refresh: reload account info
:return: list of `AccountInfo`
"""
- accs = self.core.accountManager.getAccountInfos(False, refresh)
+ accs = self.core.accountManager.getAllAccounts(refresh)
accounts = []
- for group in accs.values():
- accounts.extend([AccountInfo(acc["validuntil"], acc["login"], acc["options"], acc["valid"],
- acc["trafficleft"], acc["maxtraffic"], acc["premium"], acc["type"])
- for acc in group])
+ for plugin in accs.itervalues():
+ accounts.extend(plugin.values())
+
return accounts
@permission(PERMS.ALL)
@@ -863,7 +862,7 @@ class Api(Iface):
:return: list
"""
- return self.core.accountManager.accounts.keys()
+ return self.core.pluginManager.getAccountPlugins()
@permission(PERMS.ACCOUNTS)
def updateAccount(self, plugin, account, password=None, options={}):