diff options
author | Walter Purcaro <vuolter@gmail.com> | 2014-12-18 16:02:29 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2014-12-18 16:02:29 +0100 |
commit | fb65d5354c3cc80c3f48c3a2745b8dc01105edfd (patch) | |
tree | 822240f20e27f2d5edc3e10624fc622e7c26cdc6 /module/plugins/accounts/CzshareCom.py | |
parent | [UploadedTo] Fix trafficleft recognition (diff) | |
download | pyload-fb65d5354c3cc80c3f48c3a2745b8dc01105edfd.tar.xz |
Update account plugins
Diffstat (limited to 'module/plugins/accounts/CzshareCom.py')
-rw-r--r-- | module/plugins/accounts/CzshareCom.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/module/plugins/accounts/CzshareCom.py b/module/plugins/accounts/CzshareCom.py index 844ec9999..414883228 100644 --- a/module/plugins/accounts/CzshareCom.py +++ b/module/plugins/accounts/CzshareCom.py @@ -9,7 +9,7 @@ from module.plugins.Account import Account class CzshareCom(Account): __name__ = "CzshareCom" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __description__ = """Czshare.com account plugin, now Sdilej.cz""" __license__ = "GPLv3" @@ -27,10 +27,9 @@ class CzshareCom(Account): if m is None: return {"validuntil": 0, "trafficleft": 0} else: - credits = float(m.group(1).replace(' ', '').replace(',', '.')) - credits = credits * 1024 ** {'KiB': 0, 'MiB': 1, 'GiB': 2}[m.group(2)] - validuntil = mktime(strptime(m.group(3), '%d.%m.%y %H:%M')) - return {"validuntil": validuntil, "trafficleft": credits} + trafficleft = self.parseTraffic(m.group(1).replace(' ', '').replace(',', '.')) + m.group(2)] + validuntil = mktime(strptime(m.group(3), '%d.%m.%y %H:%M')) + return {"validuntil": validuntil, "trafficleft": trafficleft} def login(self, user, data, req): |