summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/SimplydebridCom.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-09-29 20:05:07 +0200
commitec6e5dc7fcdcefee10e37d22473c9accae1104cf (patch)
treed19824c0223b083d5b4256530443165cfabb7a04 /module/plugins/accounts/SimplydebridCom.py
parentMerge pull request #1850 from chaosblog/patch-2 (diff)
downloadpyload-ec6e5dc7fcdcefee10e37d22473c9accae1104cf.tar.xz
Account class completely rewritten + plugins updated
Diffstat (limited to 'module/plugins/accounts/SimplydebridCom.py')
-rw-r--r--module/plugins/accounts/SimplydebridCom.py11
1 files changed, 8 insertions, 3 deletions
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,