From 049298dbdbff33918454b03a3b072f418d47af97 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 6 Jun 2015 05:33:38 +0200 Subject: Use SSL when login account --- module/plugins/accounts/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 9a13e2e42..0c1885316 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -26,7 +26,7 @@ class MyfastfileCom(Account): def login(self, user, data, req): # Password to use is the API-Password written in http://myfastfile.com/myaccount - html = req.load("http://myfastfile.com/api.php", + html = req.load("https://myfastfile.com/api.php", get={"user": user, "pass": data['password']}) self.logDebug("JSON data: " + html) -- cgit v1.2.3 From 0e1ef9bc01579328e17e79416fa3c1c7b77adcc8 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Mon, 8 Jun 2015 06:08:01 +0200 Subject: Update everything --- module/plugins/accounts/MyfastfileCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 0c1885316..00de6d959 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -3,13 +3,13 @@ import time from module.common.json_layer import json_loads -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" - __version__ = "0.04" + __version__ = "0.05" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From c1764e2fea0bb05164c83a876e8cd58b97f58f25 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 16 Jun 2015 17:31:38 +0200 Subject: Update all --- module/plugins/accounts/MyfastfileCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 00de6d959..a854dd826 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -26,8 +26,8 @@ class MyfastfileCom(Account): def login(self, user, data, req): # Password to use is the API-Password written in http://myfastfile.com/myaccount - html = req.load("https://myfastfile.com/api.php", - get={"user": user, "pass": data['password']}) + html = self.load("https://myfastfile.com/api.php", + get={"user": user, "pass": data['password']}, req=req) self.logDebug("JSON data: " + html) -- cgit v1.2.3 From 20b6a2ec022202b0efb6cb69415239fb8f4d1445 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:59:20 +0200 Subject: Spare code cosmetics (2) --- module/plugins/accounts/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index a854dd826..258c99346 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -25,7 +25,7 @@ class MyfastfileCom(Account): def login(self, user, data, req): - # Password to use is the API-Password written in http://myfastfile.com/myaccount + #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", get={"user": user, "pass": data['password']}, req=req) -- cgit v1.2.3 From b1759bc440cd6013837697eb8de540914f693ffd Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 7 Jul 2015 01:23:55 +0200 Subject: No camelCase style anymore --- module/plugins/accounts/MyfastfileCom.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 258c99346..aa2dde191 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -9,19 +9,19 @@ from module.plugins.internal.Account import Account class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" - __version__ = "0.05" + __version__ = "0.06" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" __authors__ = [("stickell", "l.stickell@yahoo.it")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): if 'days_left' in self.json_data: validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60 return {"premium": True, "validuntil": validuntil, "trafficleft": -1} else: - self.logError(_("Unable to get account information")) + self.log_error(_("Unable to get account information")) def login(self, user, data, req): @@ -29,9 +29,9 @@ class MyfastfileCom(Account): html = self.load("https://myfastfile.com/api.php", get={"user": user, "pass": data['password']}, req=req) - self.logDebug("JSON data: " + html) + self.log_debug("JSON data: " + html) self.json_data = json_loads(html) if self.json_data['status'] != 'ok': - self.logError(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) - self.wrongPassword() + self.log_error(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) + self.wrong_password() -- cgit v1.2.3 From d2e2b127651a5a44b56337eb6d9ca246c97a208a Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 03:03:26 +0200 Subject: Spare fixes and code cosmetics --- module/plugins/accounts/MyfastfileCom.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index aa2dde191..4e644dace 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -27,7 +27,9 @@ class MyfastfileCom(Account): def login(self, user, data, req): #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", - get={"user": user, "pass": data['password']}, req=req) + get={"user": user, + "pass": data['password']}, + req=req) self.log_debug("JSON data: " + html) -- cgit v1.2.3 From 1f5a55ae2133a782bdcca334ecbcdbde50dbcf99 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 17 Jul 2015 15:29:48 +0200 Subject: No more need to use the req argument when call load method --- module/plugins/accounts/MyfastfileCom.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 4e644dace..8303c1b52 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -28,8 +28,7 @@ class MyfastfileCom(Account): #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", get={"user": user, - "pass": data['password']}, - req=req) + "pass": data['password']}) self.log_debug("JSON data: " + html) -- cgit v1.2.3 From ff9383bfe06d14d23bc0ed6af79aa8967965d078 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 10:59:52 +0200 Subject: Code cosmetics (3) --- module/plugins/accounts/MyfastfileCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 8303c1b52..160a354d0 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -19,7 +19,7 @@ class MyfastfileCom(Account): def load_account_info(self, user, req): if 'days_left' in self.json_data: validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60 - return {"premium": True, "validuntil": validuntil, "trafficleft": -1} + return {'premium': True, 'validuntil': validuntil, 'trafficleft': -1} else: self.log_error(_("Unable to get account information")) @@ -27,8 +27,8 @@ class MyfastfileCom(Account): def login(self, user, data, req): #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", - get={"user": user, - "pass": data['password']}) + get={'user': user, + 'pass': data['password']}) self.log_debug("JSON data: " + html) -- cgit v1.2.3 From d38e830b7c0b3c6561a0072c74bbccb5fcdf4a61 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sun, 19 Jul 2015 14:43:42 +0200 Subject: New __status__ magic key --- module/plugins/accounts/MyfastfileCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 160a354d0..0621ef0ca 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -10,6 +10,7 @@ class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.06" + __status__ = "stable" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 94d017cd2a5c1f194960827a8c7e46afc3682008 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 24 Jul 2015 06:55:49 +0200 Subject: Hotfixes (2) --- module/plugins/accounts/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 0621ef0ca..200c61b81 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -10,7 +10,7 @@ class MyfastfileCom(Account): __name__ = "MyfastfileCom" __type__ = "account" __version__ = "0.06" - __status__ = "stable" + __status__ = "testing" __description__ = """Myfastfile.com account plugin""" __license__ = "GPLv3" -- cgit v1.2.3 From 8f17f875f6e28f73ddb10da59c6464bd04922222 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 04:59:27 +0200 Subject: Account rewritten --- module/plugins/accounts/MyfastfileCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index 200c61b81..d049b13e6 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -17,7 +17,7 @@ class MyfastfileCom(Account): __authors__ = [("stickell", "l.stickell@yahoo.it")] - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): if 'days_left' in self.json_data: validuntil = time.time() + self.json_data['days_left'] * 24 * 60 * 60 return {'premium': True, 'validuntil': validuntil, 'trafficleft': -1} @@ -25,15 +25,15 @@ class MyfastfileCom(Account): self.log_error(_("Unable to get account information")) - def login(self, user, data, req): + def login(self, user, password, data, req): #: Password to use is the API-Password written in http://myfastfile.com/myaccount html = self.load("https://myfastfile.com/api.php", get={'user': user, - 'pass': data['password']}) + 'pass': password}) self.log_debug("JSON data: " + html) self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.log_error(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) - self.wrong_password() + self.fail() -- cgit v1.2.3 From a95c217627a1cb651b24e69f20640df40797aff9 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 25 Jul 2015 09:34:18 +0200 Subject: Account rewritten (2) --- module/plugins/accounts/MyfastfileCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MyfastfileCom.py') diff --git a/module/plugins/accounts/MyfastfileCom.py b/module/plugins/accounts/MyfastfileCom.py index d049b13e6..008b62cc6 100644 --- a/module/plugins/accounts/MyfastfileCom.py +++ b/module/plugins/accounts/MyfastfileCom.py @@ -36,4 +36,4 @@ class MyfastfileCom(Account): self.json_data = json_loads(html) if self.json_data['status'] != 'ok': self.log_error(_('Invalid login. The password to use is the API-Password you find in your "My Account" page')) - self.fail() + self.login_fail() -- cgit v1.2.3