summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-11 19:29:51 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-05-11 19:29:51 +0200
commit738874eb999bb8e1b5751bc57da148c9ae60104d (patch)
tree7ddac45a501caabe83d27d40defe8dffa425cb1a
parent[ClickAndLoad] Version up (diff)
parentchange trafficleft to unlimited when in Penalty-Premium state to ensure conti... (diff)
downloadpyload-738874eb999bb8e1b5751bc57da148c9ae60104d.tar.xz
Merge pull request #1411 from chipotng/stable
change trafficleft to unlimited...
-rw-r--r--module/plugins/accounts/ShareonlineBiz.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py
index 8b32ab54d..27371864e 100644
--- a/module/plugins/accounts/ShareonlineBiz.py
+++ b/module/plugins/accounts/ShareonlineBiz.py
@@ -45,8 +45,11 @@ class ShareonlineBiz(Account):
validuntil = float(api['expire_date'])
traffic = float(api['traffic_1d'].split(";")[0])
- maxtraffic = max(maxtraffic, traffic)
- trafficleft = maxtraffic - traffic
+
+ if maxtraffic > traffic:
+ trafficleft = maxtraffic - traffic
+ else:
+ trafficleft = -1
maxtraffic /= 1024 #@TODO: Remove `/ 1024` in 0.4.10
trafficleft /= 1024 #@TODO: Remove `/ 1024` in 0.4.10