summaryrefslogtreecommitdiffstats
path: root/module/plugins/accounts
diff options
context:
space:
mode:
authorGravatar Stefano <l.stickell@yahoo.it> 2013-08-24 18:43:16 +0200
committerGravatar Stefano <l.stickell@yahoo.it> 2013-08-24 18:43:16 +0200
commit5c8cfe32756e04526e042ced723ffc7f796dfbd9 (patch)
treedb7d4d0d928150f3bd9e9f0d3499164cec368d52 /module/plugins/accounts
parentLetitbit: Using API to get file information (diff)
downloadpyload-5c8cfe32756e04526e042ced723ffc7f796dfbd9.tar.xz
Realdebrid: fixed #208
Diffstat (limited to 'module/plugins/accounts')
-rw-r--r--module/plugins/accounts/RealdebridCom.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/module/plugins/accounts/RealdebridCom.py b/module/plugins/accounts/RealdebridCom.py
index 11b985a13..6cac5d0bb 100644
--- a/module/plugins/accounts/RealdebridCom.py
+++ b/module/plugins/accounts/RealdebridCom.py
@@ -5,13 +5,15 @@ from module.plugins.Account import Account
class RealdebridCom(Account):
__name__ = "RealdebridCom"
- __version__ = "0.41"
+ __version__ = "0.42"
__type__ = "account"
__description__ = """Real-Debrid.com account plugin"""
__author_name__ = ("Devirex, Hazzard")
__author_mail__ = ("naibaf_11@yahoo.de")
def loadAccountInfo(self, user, req):
+ if self.pin_code:
+ return {"premium": False}
page = req.load("http://real-debrid.com/api/account.php")
xml = dom.parseString(page)
account_info = {"validuntil": int(xml.getElementsByTagName("expiration")[0].childNodes[0].nodeValue),
@@ -20,9 +22,10 @@ class RealdebridCom(Account):
return account_info
def login(self, user, data, req):
+ self.pin_code = False
page = req.load("https://real-debrid.com/ajax/login.php", get={"user": user, "pass": data["password"]})
- # page = req.load("https://real-debrid.com/login.html",
- # post={"user": user, "pass": data["password"]}, cookies=True)
-
if "Your login informations are incorrect" in page:
self.wrongPassword()
+ elif "PIN Code required" in page:
+ self.logWarning('PIN code required. Please login to https://real-debrid.com using the PIN or disable the double authentication in your control panel on https://real-debrid.com.')
+ self.pin_code = True