diff options
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) |