diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-28 16:27:44 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-02-28 16:28:31 +0100 |
commit | 474555974e6af927798373c7893f7afc9f1c9176 (patch) | |
tree | 3cdd93aa50bd25f6478b358cfec500f2ba9678ed /module/plugins/accounts | |
parent | Merge pull request #24 from 4Christopher/stable (diff) | |
download | pyload-474555974e6af927798373c7893f7afc9f1c9176.tar.xz |
closed #25
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/PremiumizeMe.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 768fcd783..07187f908 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -4,7 +4,7 @@ from module.common.json_layer import json_loads class PremiumizeMe(Account):
__name__ = "PremiumizeMe"
- __version__ = "0.1"
+ __version__ = "0.11"
__type__ = "account"
__description__ = """Premiumize.Me account plugin"""
@@ -15,10 +15,14 @@ class PremiumizeMe(Account): # Get user data from premiumize.me
status = self.getAccountStatus(user, req)
+ self.logDebug("Api Result: " + status)
# Parse account info
account_info = {"validuntil": float(status['result']['expires']),
- "trafficleft": status['result']['trafficleft_bytes'] / 1024}
+ "trafficleft": max(0, status['result']['trafficleft_bytes'] / 1024)}
+
+ if status['result']['type'] == 'free':
+ account_info['premium'] = False
return account_info
|