diff options
author | mkaay <mkaay@mkaay.de> | 2010-08-12 00:51:10 +0200 |
---|---|---|
committer | mkaay <mkaay@mkaay.de> | 2010-08-12 00:51:10 +0200 |
commit | bc12e7c71cc93bcc22f80dba15111091b4528e03 (patch) | |
tree | 96b5204ec3ba1c2db53ca809fb909f0f4518fab0 /pyLoadCore.py | |
parent | merge (diff) | |
download | pyload-bc12e7c71cc93bcc22f80dba15111091b4528e03.tar.xz |
account plugin change, server methods for accounts
Diffstat (limited to 'pyLoadCore.py')
-rwxr-xr-x | pyLoadCore.py | 18 |
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) |