diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-04-11 12:17:03 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2014-04-11 12:17:03 +0200 |
commit | 381c4d02a900fac224ccaa802db080cf577ed2fb (patch) | |
tree | 7ae70daa2def01e05193d2bbef3a851aa33eeae1 /module/plugins/accounts | |
parent | Fix EOF (diff) | |
download | pyload-381c4d02a900fac224ccaa802db080cf577ed2fb.tar.xz |
Fix retry time formats
Merges vuolter/pyload@498b9e3
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/AlldebridCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/HotfileCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/MultiDebridCom.py | 2 | ||||
-rw-r--r-- | module/plugins/accounts/UploadedTo.py | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index 5d5c48c20..4fa82a25e 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -34,7 +34,7 @@ class AlldebridCom(Account): data["password"])) self.logDebug(page) xml = dom.parseString(page) - exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 86400 + exp_time = time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 account_info = {"validuntil": exp_time, "trafficleft": -1} return account_info diff --git a/module/plugins/accounts/HotfileCom.py b/module/plugins/accounts/HotfileCom.py index 72a04777f..7188e6758 100644 --- a/module/plugins/accounts/HotfileCom.py +++ b/module/plugins/accounts/HotfileCom.py @@ -47,7 +47,7 @@ class HotfileCom(Account): info["premium_until"] = info["premium_until"][:19] zone = int(zone[:3]) - validuntil = int(mktime(strptime(info["premium_until"], "%Y-%m-%d %H:%M:%S"))) + (zone * 3600) + validuntil = int(mktime(strptime(info["premium_until"], "%Y-%m-%d %H:%M:%S"))) + (zone * 60 * 60) tmp = {"validuntil": validuntil, "trafficleft": -1, "premium": True} elif info['is_premium'] == '0': diff --git a/module/plugins/accounts/MultiDebridCom.py b/module/plugins/accounts/MultiDebridCom.py index 987c7f6f2..f58b3f816 100644 --- a/module/plugins/accounts/MultiDebridCom.py +++ b/module/plugins/accounts/MultiDebridCom.py @@ -31,7 +31,7 @@ class MultiDebridCom(Account): def loadAccountInfo(self, user, req): if 'days_left' in self.json_data: - validuntil = int(time() + self.json_data['days_left'] * 86400) + validuntil = int(time() + self.json_data['days_left'] * 24 * 60 * 60) return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: self.logError('Unable to get account information') diff --git a/module/plugins/accounts/UploadedTo.py b/module/plugins/accounts/UploadedTo.py index 83bfb3f14..b6058115b 100644 --- a/module/plugins/accounts/UploadedTo.py +++ b/module/plugins/accounts/UploadedTo.py @@ -50,8 +50,8 @@ class UploadedTo(Account): raw_valid = re.findall(r"(\d+) (Week|weeks|days|day|hours|hour)", raw_valid) validuntil = time() for n, u in raw_valid: - validuntil += 3600 * int(n) * {"Week": 168, "weeks": 168, "days": 24, - "day": 24, "hours": 1, "hour": 1}[u] + validuntil += int(n) * 60 * 60 * {"Week": 168, "weeks": 168, "days": 24, + "day": 24, "hours": 1, "hour": 1}[u] return {"validuntil": validuntil, "trafficleft": traffic, "maxtraffic": 50 * 1024 * 1024} else: |