summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-10 19:49:37 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-10 19:49:37 +0100
commite17f58459d8d4e57ed447823a988768bf09f2703 (patch)
tree62c393fd0aecd3dec4ea1d0eaaa8142e3146e44f /module/plugins/accounts
parent[RehostTo] Fix typo (2) (diff)
downloadpyload-e17f58459d8d4e57ed447823a988768bf09f2703.tar.xz
[ZeveraCom] Improve
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/MultihostersCom.py4
-rw-r--r--module/plugins/accounts/PutdriveCom.py4
-rw-r--r--module/plugins/accounts/ZeveraCom.py17
3 files changed, 19 insertions, 6 deletions
diff --git a/module/plugins/accounts/MultihostersCom.py b/module/plugins/accounts/MultihostersCom.py
index 0be64af7f..e98f17b2d 100644
--- a/module/plugins/accounts/MultihostersCom.py
+++ b/module/plugins/accounts/MultihostersCom.py
@@ -6,11 +6,11 @@ from module.plugins.accounts.ZeveraCom import ZeveraCom
class MultihostersCom(ZeveraCom):
__name__ = "MultihostersCom"
__type__ = "account"
- __version__ = "0.02"
+ __version__ = "0.03"
__description__ = """Multihosters.com account plugin"""
__license__ = "GPLv3"
__authors__ = [("tjeh", "tjeh@gmx.net")]
- API_URL = "http://api.multihosters.com/jDownloader.ashx"
+ HOSTER_DOMAIN = "multihosters.com"
diff --git a/module/plugins/accounts/PutdriveCom.py b/module/plugins/accounts/PutdriveCom.py
index 7e7410d4e..4f2fadbcc 100644
--- a/module/plugins/accounts/PutdriveCom.py
+++ b/module/plugins/accounts/PutdriveCom.py
@@ -6,11 +6,11 @@ from module.plugins.accounts.ZeveraCom import ZeveraCom
class PutdriveCom(ZeveraCom):
__name__ = "PutdriveCom"
__type__ = "account"
- __version__ = "0.01"
+ __version__ = "0.02"
__description__ = """Putdrive.com account plugin"""
__license__ = "GPLv3"
__authors__ = [("Walter Purcaro", "vuolter@gmail.com")]
- API_URL = "http://api.putdrive.com/jDownloader.ashx"
+ HOSTER_DOMAIN = "putdrive.com"
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