summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/ZeveraCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/ZeveraCom.py')
-rw-r--r--module/plugins/accounts/ZeveraCom.py24
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: