summaryrefslogtreecommitdiffstats
path: root/pyLoadCore.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-08-12 00:51:10 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-08-12 00:51:10 +0200
commitbc12e7c71cc93bcc22f80dba15111091b4528e03 (patch)
tree96b5204ec3ba1c2db53ca809fb909f0f4518fab0 /pyLoadCore.py
parentmerge (diff)
downloadpyload-bc12e7c71cc93bcc22f80dba15111091b4528e03.tar.xz
account plugin change, server methods for accounts
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-xpyLoadCore.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/pyLoadCore.py b/pyLoadCore.py
index 11cd0241a..246bdadc6 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -608,14 +608,28 @@ class ServerMethods():
def get_events(self, uuid):
return self.core.pullManager.getEvents(uuid)
- def get_premium_accounts(self):
- #@TODO implement
+ def get_accounts(self):
plugins = self.core.pluginManager.getAccountPlugins()
data = []
for p in plugins:
data.extend(p.getAllAccounts())
return data
+ def update_account(self, plugin, account, password):
+ """ create and update account """
+ plugins = self.core.pluginManager.getAccountPlugins()
+ for p in plugins:
+ if p.__name__ == plugin:
+ p.updateAccount(account, password)
+ break
+
+ def remove_account(self, plugin, account, password):
+ plugins = self.core.pluginManager.getAccountPlugins()
+ for p in plugins:
+ if p.__name__ == plugin:
+ p.removeAccount(account, password)
+ break
+
def set_priority(self, id, priority):
p = self.core.files.getPackage(id)
p.setPriority(priority)