diff options
author | 2015-08-09 00:50:54 +0200 | |
---|---|---|
committer | 2015-08-09 00:50:54 +0200 | |
commit | b0ef3f1673e1930916604bb1264ca3a38414bc8d (patch) | |
tree | c97936e4d2a4cd6eb1072c65c8a08a7d18816b18 /module/plugins/accounts/ZeveraCom.py | |
parent | [XFileSharingPro][XFileSharingProFolder] Added default __pattern__ (diff) | |
parent | Fix https://github.com/pyload/pyload/issues/1707 (diff) | |
download | pyload-b0ef3f1673e1930916604bb1264ca3a38414bc8d.tar.xz |
Merge pull request #1 from pyload/stable
sync with stable
Diffstat (limited to 'module/plugins/accounts/ZeveraCom.py')
-rw-r--r-- | module/plugins/accounts/ZeveraCom.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index 9bc6d0487..4138ba3cc 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -2,13 +2,14 @@ import time -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class ZeveraCom(Account): __name__ = "ZeveraCom" __type__ = "account" - __version__ = "0.26" + __version__ = "0.28" + __status__ = "testing" __description__ = """Zevera.com account plugin""" __license__ = "GPLv3" @@ -26,13 +27,13 @@ class ZeveraCom(Account): def init(self): if not self.HOSTER_DOMAIN: - self.logError(_("Missing HOSTER_DOMAIN")) + self.log_error(_("Missing HOSTER_DOMAIN")) if not hasattr(self, "API_URL"): self.API_URL = "http://api.%s/jDownloader.ashx" % (self.HOSTER_DOMAIN or "") - def loadAccountInfo(self, user, req): + def parse_info(self, user, password, data, req): validuntil = None trafficleft = None premium = False @@ -47,12 +48,12 @@ class ZeveraCom(Account): return {'validuntil': validuntil, 'trafficleft': trafficleft, 'premium': premium} - def login(self, user, data, req): + def login(self, user, password, data, req): self.user = user - self.password = data['password'] + self.password = password if self.api_response(req) == "No trafic": - self.wrongPassword() + self.login_fail() def api_response(self, req, just_header=False, **kwargs): @@ -62,12 +63,11 @@ class ZeveraCom(Account): get_data.update(kwargs) - res = req.load(self.API_URL, - get=get_data, - just_header=just_header, - decode=True) + res = self.load(self.API_URL, + get=get_data, + just_header=just_header) - self.logDebug(res) + self.log_debug(res) if ':' in res: if not just_header: |