diff options
-rw-r--r-- | pyload/plugin/account/ShareonlineBiz.py | 9 | ||||
-rw-r--r-- | pyload/plugin/account/SmoozedCom.py | 8 | ||||
-rw-r--r-- | pyload/plugin/hoster/SmoozedCom.py | 4 |
3 files changed, 13 insertions, 8 deletions
diff --git a/pyload/plugin/account/ShareonlineBiz.py b/pyload/plugin/account/ShareonlineBiz.py index 97f45e0ab..81f96c014 100644 --- a/pyload/plugin/account/ShareonlineBiz.py +++ b/pyload/plugin/account/ShareonlineBiz.py @@ -8,7 +8,7 @@ from pyload.plugin.Account import Account class ShareonlineBiz(Account): __name = "ShareonlineBiz" __type = "account" - __version = "0.32" + __version = "0.33" __description = """Share-online.biz account plugin""" __license = "GPLv3" @@ -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 return {'premium' : premium, 'validuntil' : validuntil, diff --git a/pyload/plugin/account/SmoozedCom.py b/pyload/plugin/account/SmoozedCom.py index f24799caf..63381c20b 100644 --- a/pyload/plugin/account/SmoozedCom.py +++ b/pyload/plugin/account/SmoozedCom.py @@ -28,7 +28,7 @@ from pyload.plugin.Account import Account class SmoozedCom(Account): __name = "SmoozedCom" __type = "account" - __version = "0.04" + __version = "0.05" __description = """Smoozed.com account plugin""" __license = "GPLv3" @@ -36,7 +36,6 @@ class SmoozedCom(Account): def loadAccountInfo(self, user, req): - # Get user data from premiumize.me status = self.getAccountStatus(user, req) self.logDebug(status) @@ -53,7 +52,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 diff --git a/pyload/plugin/hoster/SmoozedCom.py b/pyload/plugin/hoster/SmoozedCom.py index dce714e06..83995b4cd 100644 --- a/pyload/plugin/hoster/SmoozedCom.py +++ b/pyload/plugin/hoster/SmoozedCom.py @@ -7,7 +7,7 @@ from pyload.plugin.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.activate __config = [("use_premium", "bool", "Use premium account if available", True)] @@ -17,7 +17,7 @@ class SmoozedCom(MultiHoster): __authors = [("", "")] - def handle_premium(self, pyfile): + def handle_free(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 |