From 36e60a23497ae05736c24fed2f4ce936fb61f744 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Thu, 8 Jan 2015 23:31:33 +0100 Subject: "New Year" Update: account plugins --- module/plugins/accounts/FreeWayMe.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'module/plugins/accounts/FreeWayMe.py') diff --git a/module/plugins/accounts/FreeWayMe.py b/module/plugins/accounts/FreeWayMe.py index 3b9841630..14b9f1e9a 100644 --- a/module/plugins/accounts/FreeWayMe.py +++ b/module/plugins/accounts/FreeWayMe.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class FreeWayMe(Account): __name__ = "FreeWayMe" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """FreeWayMe account plugin""" __license__ = "GPLv3" @@ -16,8 +16,7 @@ class FreeWayMe(Account): def loadAccountInfo(self, user, req): status = self.getAccountStatus(user, req) - if not status: - return False + self.logDebug(status) account_info = {"validuntil": -1, "premium": False} @@ -33,10 +32,6 @@ class FreeWayMe(Account): return account_info - def getpw(self, user): - return self.accounts[user]['password'] - - def login(self, user, data, req): status = self.getAccountStatus(user, req) @@ -47,9 +42,11 @@ class FreeWayMe(Account): def getAccountStatus(self, user, req): answer = req.load("https://www.free-way.me/ajax/jd.php", - get={"id": 4, "user": user, "pass": self.accounts[user]['password']}) + get={"id": 4, "user": user, "pass": self.getAccountData(user)['password']}) + self.logDebug("Login: %s" % answer) + if answer == "Invalid login": self.wrongPassword() - return False + return json_loads(answer) -- cgit v1.2.3