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/SimplydebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 24108eb0b..f9e8bab02 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -30,6 +30,6 @@ class SimplydebridCom(Account): self.password = data['password'] get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - res = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) + res = req.load("https://simply-debrid.com/api.php", get=get_data, decode=True) if res != "02: loggin success": self.wrongPassword() -- 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/SimplydebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index f9e8bab02..97b2b8ecd 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -2,13 +2,13 @@ import time -from module.plugins.Account import Account +from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" - __version__ = "0.11" + __version__ = "0.12" __description__ = """Simply-Debrid.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/SimplydebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 97b2b8ecd..e9fda682b 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -17,7 +17,7 @@ class SimplydebridCom(Account): def loadAccountInfo(self, user, req): get_data = {'login': 2, 'u': self.loginname, 'p': self.password} - res = req.load("http://simply-debrid.com/api.php", get=get_data, decode=True) + res = self.load("http://simply-debrid.com/api.php", get=get_data, req=req) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": return {"premium": False} @@ -30,6 +30,6 @@ class SimplydebridCom(Account): self.password = data['password'] get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - res = req.load("https://simply-debrid.com/api.php", get=get_data, decode=True) + res = self.load("https://simply-debrid.com/api.php", get=get_data, req=req) if res != "02: loggin success": self.wrongPassword() -- 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/SimplydebridCom.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index e9fda682b..14e33e827 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -8,14 +8,14 @@ from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" - __version__ = "0.12" + __version__ = "0.13" __description__ = """Simply-Debrid.com account plugin""" __license__ = "GPLv3" __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def loadAccountInfo(self, user, req): + def load_account_info(self, user, req): get_data = {'login': 2, 'u': self.loginname, 'p': self.password} res = self.load("http://simply-debrid.com/api.php", get=get_data, req=req) data = [x.strip() for x in res.split(";")] @@ -32,4 +32,4 @@ class SimplydebridCom(Account): res = self.load("https://simply-debrid.com/api.php", get=get_data, req=req) if res != "02: loggin success": - self.wrongPassword() + 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/SimplydebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 14e33e827..e0044930f 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -17,7 +17,7 @@ class SimplydebridCom(Account): def load_account_info(self, user, req): get_data = {'login': 2, 'u': self.loginname, 'p': self.password} - res = self.load("http://simply-debrid.com/api.php", get=get_data, req=req) + res = self.load("http://simply-debrid.com/api.php", get=get_data) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": return {"premium": False} @@ -30,6 +30,6 @@ class SimplydebridCom(Account): self.password = data['password'] get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - res = self.load("https://simply-debrid.com/api.php", get=get_data, req=req) + res = self.load("https://simply-debrid.com/api.php", get=get_data) if res != "02: loggin success": 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/SimplydebridCom.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index e0044930f..d773c63ec 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -20,9 +20,9 @@ class SimplydebridCom(Account): res = self.load("http://simply-debrid.com/api.php", get=get_data) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": - return {"premium": False} + return {'premium': False} else: - return {"trafficleft": -1, "validuntil": time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} + return {'trafficleft': -1, 'validuntil': time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} 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/SimplydebridCom.py | 1 + 1 file changed, 1 insertion(+) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index d773c63ec..1250332e1 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -9,6 +9,7 @@ class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" __version__ = "0.13" + __status__ = "stable" __description__ = """Simply-Debrid.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/SimplydebridCom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 1250332e1..1707efe22 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -9,7 +9,7 @@ class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" __version__ = "0.13" - __status__ = "stable" + __status__ = "testing" __description__ = """Simply-Debrid.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/SimplydebridCom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index 1707efe22..b123021dd 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -16,7 +16,7 @@ class SimplydebridCom(Account): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def load_account_info(self, user, req): + def parse_info(self, user, password, data, req): get_data = {'login': 2, 'u': self.loginname, 'p': self.password} res = self.load("http://simply-debrid.com/api.php", get=get_data) data = [x.strip() for x in res.split(";")] @@ -26,11 +26,11 @@ class SimplydebridCom(Account): return {'trafficleft': -1, 'validuntil': time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} - def login(self, user, data, req): + def login(self, user, password, data, req): self.loginname = user - self.password = data['password'] + self.password = password get_data = {'login': 1, 'u': self.loginname, 'p': self.password} res = self.load("https://simply-debrid.com/api.php", get=get_data) if res != "02: loggin success": - 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/SimplydebridCom.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'module/plugins/accounts/SimplydebridCom.py') diff --git a/module/plugins/accounts/SimplydebridCom.py b/module/plugins/accounts/SimplydebridCom.py index b123021dd..84c38227e 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -17,8 +17,10 @@ class SimplydebridCom(Account): def parse_info(self, user, password, data, req): - get_data = {'login': 2, 'u': self.loginname, 'p': self.password} - res = self.load("http://simply-debrid.com/api.php", get=get_data) + res = self.load("http://simply-debrid.com/api.php", + get={'login': 2, + 'u' : user, + 'p' : password}) data = [x.strip() for x in res.split(";")] if str(data[0]) != "1": return {'premium': False} @@ -27,10 +29,9 @@ class SimplydebridCom(Account): def login(self, user, password, data, req): - self.loginname = user - self.password = password - get_data = {'login': 1, 'u': self.loginname, 'p': self.password} - - res = self.load("https://simply-debrid.com/api.php", get=get_data) + res = self.load("https://simply-debrid.com/api.php", + get={'login': 1, + 'u' : user, + 'p' : password}) if res != "02: loggin success": - self.fail() + self.login_fail() -- cgit v1.2.3