From c86a4ead904d3bb772338a3bf6024260d2bac121 Mon Sep 17 00:00:00 2001 From: Micha Jay Date: Mon, 11 May 2015 15:13:54 +0200 Subject: change trafficleft to unlimited when in Penalty-Premium state to ensure continues Downloads --- module/plugins/accounts/ShareonlineBiz.py | 7 +++++-- 1 file 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 -- cgit v1.2.3 From 87164856d5d190c830609e296f47fde6820d023b Mon Sep 17 00:00:00 2001 From: smoozed Date: Mon, 11 May 2015 17:43:10 +0200 Subject: Fixed #1399 When the account is not premium, check if there is trial time left. --- module/plugins/accounts/SmoozedCom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 56cd1864a..8fb997b54 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -34,7 +34,6 @@ class SmoozedCom(Account): def loadAccountInfo(self, user, req): - # Get user data from premiumize.me status = self.getAccountStatus(user, req) self.logDebug(status) @@ -51,7 +50,10 @@ class SmoozedCom(Account): 'hosters' : [hoster["name"] for hoster in status["data"]["hoster"]]} if info['validuntil'] < time.time(): - info['premium'] = False + if float(status["data"]["user"].get("user_trial", 0)) > time.time(): + info['premium'] = True + else: + info['premium'] = False else: info['premium'] = True -- cgit v1.2.3 From 6faf688fdd1657826d0db99fd9ff4f9c94582721 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 11 May 2015 20:10:40 +0200 Subject: [ShareonlineBiz][SmoozedCom] Version up --- module/plugins/accounts/ShareonlineBiz.py | 2 +- module/plugins/accounts/SmoozedCom.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/plugins/accounts/ShareonlineBiz.py b/module/plugins/accounts/ShareonlineBiz.py index 27371864e..4214b4401 100644 --- a/module/plugins/accounts/ShareonlineBiz.py +++ b/module/plugins/accounts/ShareonlineBiz.py @@ -8,7 +8,7 @@ from module.plugins.Account import Account class ShareonlineBiz(Account): __name__ = "ShareonlineBiz" __type__ = "account" - __version__ = "0.32" + __version__ = "0.33" __description__ = """Share-online.biz account plugin""" __license__ = "GPLv3" diff --git a/module/plugins/accounts/SmoozedCom.py b/module/plugins/accounts/SmoozedCom.py index 8fb997b54..1c303331b 100644 --- a/module/plugins/accounts/SmoozedCom.py +++ b/module/plugins/accounts/SmoozedCom.py @@ -26,7 +26,7 @@ from module.plugins.Account import Account class SmoozedCom(Account): __name__ = "SmoozedCom" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __description__ = """Smoozed.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From ac3211e9d24e474a6b46c2b8b63f09d8ac928fca Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 11 May 2015 23:29:23 +0200 Subject: [SmoozedCom] Fix https://github.com/pyload/pyload/issues/1399 (2) --- module/plugins/hoster/SmoozedCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/plugins/hoster/SmoozedCom.py b/module/plugins/hoster/SmoozedCom.py index 5d453cf57..9ae12f145 100644 --- a/module/plugins/hoster/SmoozedCom.py +++ b/module/plugins/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from module.plugins.internal.MultiHoster import MultiHoster class SmoozedCom(MultiHoster): __name__ = "SmoozedCom" __type__ = "hoster" - __version__ = "0.04" + __version__ = "0.05" __pattern__ = r'^unmatchable$' #: Since we want to allow the user to specify the list of hoster to use we let MultiHoster.coreReady __config__ = [("use_premium", "bool", "Use premium account if available", True)] @@ -17,7 +17,7 @@ class SmoozedCom(MultiHoster): __authors__ = [("", "")] - def handlePremium(self, pyfile): + def handleFree(self, pyfile): # In some cases hostsers do not supply us with a filename at download, so we # are going to set a fall back filename (e.g. for freakshare or xfileshare) pyfile.name = pyfile.name.split('/').pop() # Remove everthing before last slash -- cgit v1.2.3