summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts/AlldebridCom.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/accounts/AlldebridCom.py')
-rw-r--r--module/plugins/accounts/AlldebridCom.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py
index 845c1b835..32113c890 100644
--- a/module/plugins/accounts/AlldebridCom.py
+++ b/module/plugins/accounts/AlldebridCom.py
@@ -12,16 +12,25 @@ from module.plugins.internal.Account import Account
class AlldebridCom(Account):
__name__ = "AlldebridCom"
__type__ = "account"
- __version__ = "0.27"
+ __version__ = "0.28"
__status__ = "testing"
+ __config__ = [("mh_mode" , "all;listed;unlisted", "Filter hosters to use" , "all"),
+ ("mh_list" , "str" , "Hoster list (comma separated)", "" ),
+ ("mh_interval", "int" , "Reload interval in minutes" , 60 )]
+
__description__ = """AllDebrid.com account plugin"""
__license__ = "GPLv3"
__authors__ = [("Andy Voigt", "spamsales@online.de")]
- def grab_info(self, user, password, data, req):
- data = self.get_data(user)
+ def grab_hosters(self, user, password, data):
+ html = self.load("https://www.alldebrid.com/api.php",
+ get={'action': "get_host"}).replace("\"", "").strip()
+ return [x.strip() for x in html.split(",") if x.strip()]
+
+
+ def grab_info(self, user, password, data):
html = self.load("http://www.alldebrid.com/account/")
soup = BeautifulSoup.BeautifulSoup(html)
@@ -38,7 +47,6 @@ class AlldebridCom(Account):
#: Get expiration date from API
except Exception:
- data = self.get_data(user)
html = self.load("https://www.alldebrid.com/api.php",
get={'action': "info_user",
'login' : user,
@@ -54,7 +62,7 @@ class AlldebridCom(Account):
'premium' : True }
- def login(self, user, password, data, req):
+ def signin(self, user, password, data):
html = self.load("https://www.alldebrid.com/register/",
get={'action' : "login",
'login_login' : user,