diff options
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r-- | module/plugins/accounts/AlldebridCom.py | 7 | ||||
-rw-r--r-- | module/plugins/accounts/RealdebridCom.py | 16 |
2 files changed, 14 insertions, 9 deletions
diff --git a/module/plugins/accounts/AlldebridCom.py b/module/plugins/accounts/AlldebridCom.py index e9084dcc3..e02983e1c 100644 --- a/module/plugins/accounts/AlldebridCom.py +++ b/module/plugins/accounts/AlldebridCom.py @@ -12,7 +12,7 @@ from module.plugins.internal.Account import Account class AlldebridCom(Account): __name__ = "AlldebridCom" __type__ = "account" - __version__ = "0.24" + __version__ = "0.25" __description__ = """AllDebrid.com account plugin""" __license__ = "GPLv3" @@ -46,8 +46,9 @@ class AlldebridCom(Account): xml = xml.dom.minidom.parseString(html) exp_time = time.time() + int(xml.getElementsByTagName("date")[0].childNodes[0].nodeValue) * 24 * 60 * 60 - account_info = {"validuntil": exp_time, "trafficleft": -1} - return account_info + return {'validuntil' : exp_time, + 'trafficleft': -1 , + 'premium' : True } def login(self, user, data, req): diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py index a4bd52062..9b13aeefd 100644 --- a/module/plugins/accounts/RealdebridCom.py +++ b/module/plugins/accounts/RealdebridCom.py @@ -8,7 +8,7 @@ from module.plugins.internal.Account import Account class RealdebridCom(Account): __name__ = "RealdebridCom" __type__ = "account" - __version__ = "0.46" + __version__ = "0.47" __description__ = """Real-Debrid.com account plugin""" __license__ = "GPLv3" @@ -17,17 +17,21 @@ class RealdebridCom(Account): def loadAccountInfo(self, user, req): if self.pin_code: - return {"premium": False} + return + html = req.load("https://real-debrid.com/api/account.php") - xml = xml.dom.minidom.parseString(html) - account_info = {"validuntil": float(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue), - "trafficleft": -1} + xml = xml.dom.minidom.parseString(html) + + validuntil = float(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue) - return account_info + return {'validuntil' : validuntil, + 'trafficleft': -1 , + 'premium' : True } def login(self, user, data, req): self.pin_code = False + html = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data['password']}, decode=True) |