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/MegaDebridEu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index a082b97af..fc7a5e5a3 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- -from module.plugins.Account import Account +from module.plugins.internal.Account import Account from module.common.json_layer import json_loads class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" - __version__ = "0.20" + __version__ = "0.21" __description__ = """mega-debrid.eu 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/MegaDebridEu.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index fc7a5e5a3..4767b9b05 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -20,8 +20,8 @@ class MegaDebridEu(Account): def loadAccountInfo(self, user, req): data = self.getAccountData(user) - jsonResponse = req.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}) + jsonResponse = self.load(self.API_URL, + get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) if res['response_code'] == "ok": @@ -32,8 +32,8 @@ class MegaDebridEu(Account): def login(self, user, data, req): - jsonResponse = req.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}) + jsonResponse = self.load(self.API_URL, + get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) if res['response_code'] != "ok": self.wrongPassword() -- cgit v1.2.3 From 164512b6a74c94a731fcee7435dce1ccfa2f71e7 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Wed, 17 Jun 2015 18:29:50 +0200 Subject: Spare code cosmetics --- module/plugins/accounts/MegaDebridEu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 4767b9b05..9a7508617 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -9,7 +9,7 @@ class MegaDebridEu(Account): __type__ = "account" __version__ = "0.21" - __description__ = """mega-debrid.eu account plugin""" + __description__ = """Mega-debrid.eu account plugin""" __license__ = "GPLv3" __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")] -- 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/MegaDebridEu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 9a7508617..53c67833c 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -14,7 +14,7 @@ class MegaDebridEu(Account): __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")] - # Define the base URL of MegaDebrid api + #: Define the base URL of MegaDebrid api API_URL = "https://www.mega-debrid.eu/api.php" -- 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/MegaDebridEu.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 53c67833c..7a6e36f05 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -7,7 +7,7 @@ from module.common.json_layer import json_loads class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" - __version__ = "0.21" + __version__ = "0.22" __description__ = """Mega-debrid.eu account plugin""" __license__ = "GPLv3" @@ -18,8 +18,8 @@ class MegaDebridEu(Account): API_URL = "https://www.mega-debrid.eu/api.php" - def loadAccountInfo(self, user, req): - data = self.getAccountData(user) + def load_account_info(self, user, req): + data = self.get_account_data(user) jsonResponse = self.load(self.API_URL, get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) @@ -27,7 +27,7 @@ class MegaDebridEu(Account): if res['response_code'] == "ok": return {"premium": True, "validuntil": float(res['vip_end']), "status": True} else: - self.logError(res) + self.log_error(res) return {"status": False, "premium": False} @@ -36,4 +36,4 @@ class MegaDebridEu(Account): get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) res = json_loads(jsonResponse) if res['response_code'] != "ok": - self.wrongPassword() + 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/MegaDebridEu.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 7a6e36f05..817dd800f 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -21,7 +21,10 @@ class MegaDebridEu(Account): def load_account_info(self, user, req): data = self.get_account_data(user) jsonResponse = self.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) + get={'action' : 'connectUser', + 'login' : user, + 'password': data['password']}, + req=req) res = json_loads(jsonResponse) if res['response_code'] == "ok": @@ -33,7 +36,10 @@ class MegaDebridEu(Account): def login(self, user, data, req): jsonResponse = self.load(self.API_URL, - get={'action': 'connectUser', 'login': user, 'password': data['password']}, req=req) + get={'action' : 'connectUser', + 'login' : user, + 'password': data['password']}, + req=req) res = json_loads(jsonResponse) if res['response_code'] != "ok": self.wrong_password() -- 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/MegaDebridEu.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 817dd800f..4f055ff37 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -23,8 +23,7 @@ class MegaDebridEu(Account): jsonResponse = self.load(self.API_URL, get={'action' : 'connectUser', 'login' : user, - 'password': data['password']}, - req=req) + 'password': data['password']}) res = json_loads(jsonResponse) if res['response_code'] == "ok": @@ -38,8 +37,7 @@ class MegaDebridEu(Account): jsonResponse = self.load(self.API_URL, get={'action' : 'connectUser', 'login' : user, - 'password': data['password']}, - req=req) + 'password': data['password']}) res = json_loads(jsonResponse) if res['response_code'] != "ok": self.wrong_password() -- 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/MegaDebridEu.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 4f055ff37..791049bac 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -27,10 +27,10 @@ class MegaDebridEu(Account): res = json_loads(jsonResponse) if res['response_code'] == "ok": - return {"premium": True, "validuntil": float(res['vip_end']), "status": True} + return {'premium': True, 'validuntil': float(res['vip_end']), 'status': True} else: self.log_error(res) - return {"status": False, "premium": False} + return {'status': False, 'premium': False} def login(self, user, data, req): -- 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/MegaDebridEu.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 791049bac..05ee6c3be 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -8,6 +8,7 @@ class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" __version__ = "0.22" + __status__ = "stable" __description__ = """Mega-debrid.eu 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/MegaDebridEu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 05ee6c3be..5fe490ec4 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -8,7 +8,7 @@ class MegaDebridEu(Account): __name__ = "MegaDebridEu" __type__ = "account" __version__ = "0.22" - __status__ = "stable" + __status__ = "testing" __description__ = """Mega-debrid.eu 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/MegaDebridEu.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 5fe490ec4..682de4db1 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -19,12 +19,12 @@ class MegaDebridEu(Account): API_URL = "https://www.mega-debrid.eu/api.php" - def load_account_info(self, user, req): - data = self.get_account_data(user) + def parse_info(self, user, password, data, req): + data = self.get_data(user) jsonResponse = self.load(self.API_URL, get={'action' : 'connectUser', 'login' : user, - 'password': data['password']}) + 'password': password}) res = json_loads(jsonResponse) if res['response_code'] == "ok": @@ -34,11 +34,11 @@ class MegaDebridEu(Account): return {'status': False, 'premium': False} - def login(self, user, data, req): + def login(self, user, password, data, req): jsonResponse = self.load(self.API_URL, get={'action' : 'connectUser', 'login' : user, - 'password': data['password']}) + 'password': password}) res = json_loads(jsonResponse) if res['response_code'] != "ok": - 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/MegaDebridEu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/MegaDebridEu.py') diff --git a/module/plugins/accounts/MegaDebridEu.py b/module/plugins/accounts/MegaDebridEu.py index 682de4db1..d7a04491d 100644 --- a/module/plugins/accounts/MegaDebridEu.py +++ b/module/plugins/accounts/MegaDebridEu.py @@ -41,4 +41,4 @@ class MegaDebridEu(Account): 'password': password}) res = json_loads(jsonResponse) if res['response_code'] != "ok": - self.fail() + self.login_fail() -- cgit v1.2.3