diff options
-rw-r--r-- | pavement.py | 2 | ||||
-rw-r--r-- | pyload/plugins/Account.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/pavement.py b/pavement.py index 2787a613f..1c3cfc07a 100644 --- a/pavement.py +++ b/pavement.py @@ -75,6 +75,7 @@ module_replace = [ ('from module.lib import feedparser', 'import feedparser'), ('self.account.getAccountInfo(self.user, ', 'self.account.getAccountInfo('), ('self.account.getAccountInfo(self.user)', 'self.account.getAccountInfo()'), + ('self.account.getAccountInfo()["premium"]', 'self.account.isPremium()'), ('self.account.accounts[self.user]["password"]', 'self.account.password'), ("self.account.accounts[self.user]['password']", 'self.account.password'), ('from module.', 'from pyload.') # This should be always the last one @@ -289,7 +290,6 @@ def replace_module_imports(): elif '/accounts/' in path: content = content.replace('self.accounts[user]["password"]', 'self.password') content = content.replace("self.accounts[user]['password']", 'self.password') - content = content.replace('.getAccountInfo()["premium"]', '.isPremium()') f = open(path, 'w') f.write(content) f.close() diff --git a/pyload/plugins/Account.py b/pyload/plugins/Account.py index eabfe6885..ac2aebe3e 100644 --- a/pyload/plugins/Account.py +++ b/pyload/plugins/Account.py @@ -185,6 +185,7 @@ class Account(Base): """ return -1, 0, True + # TODO: this method is ambiguous, it returns nothing, but just retrieves the data if needed @lock def getAccountInfo(self, force=False): """retrieve account info's for an user, do **not** overwrite this method!\\ @@ -192,7 +193,6 @@ class Account(Base): :param name: username :param force: reloads cached account information - :return: dictionary with information """ if force or self.timestamp + self.info_threshold * 60 < time(): |