diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-12-31 16:01:24 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-12-31 16:01:24 +0100 |
commit | d35c003cc53d4723d1dfe0d81eeb9bea78cee594 (patch) | |
tree | ff9d47a0cee6116836955e37bf4471c1f1d82bee /module/plugins/AccountManager.py | |
parent | some account fixes (diff) | |
download | pyload-d35c003cc53d4723d1dfe0d81eeb9bea78cee594.tar.xz |
new crypter plugin API, now decrypting possible for now.
Diffstat (limited to 'module/plugins/AccountManager.py')
-rw-r--r-- | module/plugins/AccountManager.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/module/plugins/AccountManager.py b/module/plugins/AccountManager.py index c718510ed..77139206c 100644 --- a/module/plugins/AccountManager.py +++ b/module/plugins/AccountManager.py @@ -21,7 +21,6 @@ from threading import Lock from random import choice from module.common.json_layer import json -from module.interaction.PullEvents import AccountUpdateEvent from module.utils import lock class AccountManager(): @@ -85,12 +84,15 @@ class AccountManager(): self.createAccount(plugin, user, password, options) self.saveAccounts() + self.sendChange() + @lock def removeAccount(self, plugin, user): """remove account""" if plugin in self.accounts and user in self.accounts[plugin]: del self.accounts[plugin][user] self.core.db.removeAccount(plugin, user) + self.sendChange() else: self.core.log.debug("Remove non existing account %s %s" % (plugin, user)) @@ -118,9 +120,6 @@ class AccountManager(): for acc in p_dict.itervalues(): acc.getAccountInfo() - e = AccountUpdateEvent() - self.core.pullManager.addEvent(e) - return self.accounts def refreshAllAccounts(self): @@ -131,5 +130,4 @@ class AccountManager(): def sendChange(self): - e = AccountUpdateEvent() - self.core.pullManager.addEvent(e) + self.core.eventManager.dispatchEvent("accountsUpdated")
\ No newline at end of file |