summaryrefslogtreecommitdiffstats
path: root/module/AccountManager.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-11-06 15:39:28 +0100
committerGravatar mkaay <mkaay@mkaay.de> 2010-11-06 15:39:28 +0100
commit761a4104baaaa863ade8ca1aa0bda249557a0f80 (patch)
treee5a74cb97865bad7d327c7d910c2bb792c55a77d /module/AccountManager.py
parentcache fix (diff)
downloadpyload-761a4104baaaa863ade8ca1aa0bda249557a0f80.tar.xz
account editing + fixes
Diffstat (limited to 'module/AccountManager.py')
-rw-r--r--module/AccountManager.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/module/AccountManager.py b/module/AccountManager.py
index d1733585f..a76a9915a 100644
--- a/module/AccountManager.py
+++ b/module/AccountManager.py
@@ -36,6 +36,7 @@ class AccountManager():
self.accounts = {} # key = ( plugin )
self.plugins = {}
+ self.accountInfoCache = {}
self.initAccountPlugins()
@@ -144,6 +145,7 @@ class AccountManager():
self.saveAccounts()
p.getAllAccounts(force=True)
+ self.core.scheduler.addJob(0, self.core.accountManager.getAccountInfos)
#----------------------------------------------------------------------
def removeAccount(self, plugin, user):
@@ -153,13 +155,13 @@ class AccountManager():
p = self.getAccountPlugin(plugin)
p.removeAccount(user)
- cache = self.accountInfoCache
- if self.cache.has_key(p.__name__):
- if cache[p].has_key(user):
- del cache[p][user]
+ if self.accounts.has_key(p):
+ if self.accounts[p].has_key(user):
+ del self.accounts[p][user]
self.saveAccounts()
p.getAllAccounts(force=True)
+ self.core.scheduler.addJob(0, self.core.accountManager.getAccountInfos)
def getCachedAccountInfos(self, refresh=True):
if refresh: