From 2efb23c40c2a77896d5fabf29af677aec9c6bd45 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 15 Jun 2015 07:01:02 +0200 Subject: [PremiumizeMe] Premium account fixup --- module/plugins/accounts/EuroshareEu.py | 3 ++- module/plugins/accounts/PremiumizeMe.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts') diff --git a/module/plugins/accounts/EuroshareEu.py b/module/plugins/accounts/EuroshareEu.py index b0e87136f..0568b9c4f 100644 --- a/module/plugins/accounts/EuroshareEu.py +++ b/module/plugins/accounts/EuroshareEu.py @@ -22,7 +22,8 @@ class EuroshareEu(Account): m = re.search('id="input_expire_date" value="(\d+\.\d+\.\d+ \d+:\d+)"', html) if m is None: - premium, validuntil = False, -1 + premium = False + validuntil = -1 else: premium = True validuntil = time.mktime(time.strptime(m.group(1), "%d.%m.%Y %H:%M")) diff --git a/module/plugins/accounts/PremiumizeMe.py b/module/plugins/accounts/PremiumizeMe.py index 5112bceb6..49f078abd 100644 --- a/module/plugins/accounts/PremiumizeMe.py +++ b/module/plugins/accounts/PremiumizeMe.py @@ -23,8 +23,8 @@ class PremiumizeMe(Account): account_info = {"validuntil": float(status['result']['expires']), "trafficleft": max(0, status['result']['trafficleft_bytes'] / 1024)} #@TODO: Remove `/ 1024` in 0.4.10 - if status['result']['type'] == 'free': - account_info['premium'] = False + if status['result']['type'] != 'free': + account_info['premium'] = True return account_info -- cgit v1.2.3