diff options
author | Pedro Algarvio <pedro@algarvio.me> | 2012-02-04 04:06:15 +0100 |
---|---|---|
committer | Pedro Algarvio <pedro@algarvio.me> | 2012-02-04 04:06:15 +0100 |
commit | a0ebf8d7a70fde61c754af2f146abc3d9b3511f9 (patch) | |
tree | 9201d95bd60cea72873eab62d6592400048ae0df /module/plugins/accounts | |
parent | Correct import. (diff) | |
download | pyload-a0ebf8d7a70fde61c754af2f146abc3d9b3511f9.tar.xz |
Add helper method `formatTrafficleft()` to `module.plugins.Account`.
Regarding Oron account and hoster plugins, make use of `formatSize`, `parseFileSize` and the `Account`'s `formatTrafficleft()` helper method.
Diffstat (limited to 'module/plugins/accounts')
-rwxr-xr-x | module/plugins/accounts/OronCom.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/module/plugins/accounts/OronCom.py b/module/plugins/accounts/OronCom.py index 1fe8a4449..2c1d33162 100755 --- a/module/plugins/accounts/OronCom.py +++ b/module/plugins/accounts/OronCom.py @@ -20,6 +20,7 @@ from module.plugins.Account import Account import re from time import strptime, mktime +from module.utils import formatSize, parseFileSize class OronCom(Account): __name__ = "OronCom" @@ -37,7 +38,7 @@ class OronCom(Account): validuntil = validuntil.group(1) validuntil = int(mktime(strptime(validuntil, "%d %B %Y"))) trafficleft = re.search(r'<td>Download Traffic verfügbar:</td>\s*<td>(.*?)</td>', src).group(1) - self.logDebug("Oron left: " + trafficleft) + self.logDebug("Oron left: " + formatSize(parseFileSize(trafficleft))) trafficleft = int(self.parseTraffic(trafficleft)) premium = True else: |