diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-10-28 21:55:21 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-10-28 21:55:21 +0100 |
commit | 227a0eb5157875e75a385118ec3485b044ccdb8a (patch) | |
tree | 137c21b9abc2cc644a87f03c36bfd7e20981d5b5 /module | |
parent | [EasybytezCom] Remove unnecessary loadAccountInfo method (diff) | |
download | pyload-227a0eb5157875e75a385118ec3485b044ccdb8a.tar.xz |
Improve loadAccountInfo stuff
Diffstat (limited to 'module')
-rw-r--r-- | module/plugins/Account.py | 22 | ||||
-rw-r--r-- | module/plugins/accounts/EasybytezCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/XFileSharingPro.py | 7 | ||||
-rw-r--r-- | module/plugins/internal/XFSPAccount.py | 5 |
4 files changed, 15 insertions, 21 deletions
diff --git a/module/plugins/Account.py b/module/plugins/Account.py index 7bdca729c..4fac3525f 100644 --- a/module/plugins/Account.py +++ b/module/plugins/Account.py @@ -188,18 +188,16 @@ class Account(Base): :param req: `Request` instance :return: """ - return { - "validuntil": None, # -1 for unlimited - "login": name, - #"password": self.accounts[name]['password'], #@XXX: security - "options": self.accounts[name]['options'], - "valid": self.accounts[name]['valid'], - "trafficleft": None, # in kb, -1 for unlimited - "maxtraffic": None, - "premium": True, #useful for free accounts - "timestamp": 0, #time this info was retrieved - "type": self.__name__, - } + return {"validuntil": None, #: -1 for unlimited + "login": name, + # "password": self.accounts[name]['password'], #: commented due security reason + "options": self.accounts[name]['options'], + "valid": self.accounts[name]['valid'], + "trafficleft": None, #: in kb, -1 for unlimited + "maxtraffic": None, + "premium": False, + "timestamp": 0, #: time this info was retrieved + "type": self.__name__} def getAllAccounts(self, force=False): diff --git a/module/plugins/accounts/EasybytezCom.py b/module/plugins/accounts/EasybytezCom.py index d9d453b85..55d413e04 100644 --- a/module/plugins/accounts/EasybytezCom.py +++ b/module/plugins/accounts/EasybytezCom.py @@ -10,7 +10,7 @@ from module.plugins.internal.XFSPAccount import XFSPAccount class EasybytezCom(XFSPAccount): __name__ = "EasybytezCom" __type__ = "account" - __version__ = "0.08" + __version__ = "0.09" __description__ = """EasyBytez.com account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/XFileSharingPro.py b/module/plugins/accounts/XFileSharingPro.py index 17f46e102..16d1ccfda 100644 --- a/module/plugins/accounts/XFileSharingPro.py +++ b/module/plugins/accounts/XFileSharingPro.py @@ -8,7 +8,7 @@ from module.plugins.internal.XFSPAccount import XFSPAccount class XFileSharingPro(XFSPAccount): __name__ = "XFileSharingPro" __type__ = "account" - __version__ = "0.02" + __version__ = "0.03" __description__ = """XFileSharingPro multi-purpose account plugin""" __license__ = "GPLv3" @@ -19,10 +19,7 @@ class XFileSharingPro(XFSPAccount): def loadAccountInfo(self, user, req): - if self.HOSTER_NAME: - return super(XFileSharingPro, self).loadAccountInfo(user, req) - else: - return {'validuntil': None, 'trafficleft': None, 'premium': None} + return super(XFileSharingPro if self.HOSTER_NAME else XFSPAccount, self).loadAccountInfo(user, req) def login(self, user, data, req): diff --git a/module/plugins/internal/XFSPAccount.py b/module/plugins/internal/XFSPAccount.py index 5f15a4659..db8f92aec 100644 --- a/module/plugins/internal/XFSPAccount.py +++ b/module/plugins/internal/XFSPAccount.py @@ -12,7 +12,7 @@ from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSPAccount(Account): __name__ = "XFSPAccount" __type__ = "account" - __version__ = "0.20" + __version__ = "0.21" __description__ = """XFileSharingPro account plugin""" __license__ = "GPLv3" @@ -27,7 +27,7 @@ class XFSPAccount(Account): example: HOSTER_URL = r'linestorage.com' PREMIUM_PATTERN: (optional) Checks if the account is premium - example: PREMIUM_PATTERN = r'>Renew premium<' + example: PREMIUM_PATTERN = r'>Renew premium' """ HOSTER_NAME = None @@ -74,7 +74,6 @@ class XFSPAccount(Account): else: if validuntil > mktime(gmtime()): premium = True - trafficleft = -1 else: if premium is False: #: registered account type (not premium) validuntil = -1 |