From ec6e5dc7fcdcefee10e37d22473c9accae1104cf Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Tue, 29 Sep 2015 20:05:07 +0200 Subject: Account class completely rewritten + plugins updated --- module/plugins/accounts/SimplydebridCom.py | 11 ++++++++--- 1 file changed, 8 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 b8d679604..862cfe22b 100644 --- a/module/plugins/accounts/SimplydebridCom.py +++ b/module/plugins/accounts/SimplydebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class SimplydebridCom(Account): __name__ = "SimplydebridCom" __type__ = "account" - __version__ = "0.14" + __version__ = "0.15" __status__ = "testing" __description__ = """Simply-Debrid.com account plugin""" @@ -16,7 +16,12 @@ class SimplydebridCom(Account): __authors__ = [("Kagenoshin", "kagenoshin@gmx.ch")] - def grab_info(self, user, password, data, req): + def grab_hosters(self, user, password, data): + html = self.load("http://simply-debrid.com/api.php", get={'list': 1}) + return [x.strip() for x in html.rstrip(';').replace("\"", "").split(";")] + + + def grab_info(self, user, password, data): res = self.load("http://simply-debrid.com/api.php", get={'login': 2, 'u' : user, @@ -28,7 +33,7 @@ class SimplydebridCom(Account): return {'trafficleft': -1, 'validuntil': time.mktime(time.strptime(str(data[2]), "%d/%m/%Y"))} - def login(self, user, password, data, req): + def signin(self, user, password, data): res = self.load("https://simply-debrid.com/api.php", get={'login': 1, 'u' : user, -- cgit v1.2.3