From e17f58459d8d4e57ed447823a988768bf09f2703 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 10 Jan 2015 19:49:37 +0100 Subject: [ZeveraCom] Improve --- module/plugins/accounts/ZeveraCom.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/ZeveraCom.py') diff --git a/module/plugins/accounts/ZeveraCom.py b/module/plugins/accounts/ZeveraCom.py index d679f5aad..d863e4b37 100644 --- a/module/plugins/accounts/ZeveraCom.py +++ b/module/plugins/accounts/ZeveraCom.py @@ -8,7 +8,7 @@ from module.plugins.Account import Account class ZeveraCom(Account): __name__ = "ZeveraCom" __type__ = "account" - __version__ = "0.23" + __version__ = "0.24" __description__ = """Zevera.com account plugin""" __license__ = "GPLv3" @@ -16,9 +16,22 @@ class ZeveraCom(Account): ("Walter Purcaro", "vuolter@gmail.com")] - API_URL = "http://api.zevera.com/jDownloader.ashx" + HOSTER_DOMAIN = "zevera.com" + + + def __init__(self, manager, accounts): #@TODO: remove in 0.4.10 + self.init() + return super(ZeveraCom, self).__init__(manager, accounts) + def init(self): + if not self.HOSTER_DOMAIN: + self.logError(_("Missing HOSTER_DOMAIN")) + + if not self.API_URL: + self.API_URL = "http://api.%s/jDownloader.ashx" % (self.HOSTER_DOMAIN or "") + + def loadAccountInfo(self, user, req): validuntil = None trafficleft = None -- cgit v1.2.3