summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/FreeWayMe.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-08 23:31:33 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-08 23:31:33 +0100
commit36e60a23497ae05736c24fed2f4ce936fb61f744 (patch)
treed743ace8e6c032cccb524cbb8474263d9d7bd4e1 /module/plugins/accounts/FreeWayMe.py
parent"New Year" Update: internal plugins (diff)
downloadpyload-36e60a23497ae05736c24fed2f4ce936fb61f744.tar.xz
"New Year" Update: account plugins
Diffstat (limited to 'module/plugins/accounts/FreeWayMe.py')
-rw-r--r--module/plugins/accounts/FreeWayMe.py15
1 files changed, 6 insertions, 9 deletions
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)