summaryrefslogtreecommitdiffstats
path: root/pyload/plugins/account/MegaDebridEu.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins/account/MegaDebridEu.py')
-rw-r--r--pyload/plugins/account/MegaDebridEu.py20
1 files changed, 11 insertions, 9 deletions
diff --git a/pyload/plugins/account/MegaDebridEu.py b/pyload/plugins/account/MegaDebridEu.py
index a408690c6..50f24b83d 100644
--- a/pyload/plugins/account/MegaDebridEu.py
+++ b/pyload/plugins/account/MegaDebridEu.py
@@ -5,12 +5,13 @@ from pyload.utils import json_loads
class MegaDebridEu(Account):
- __name__ = "MegaDebridEu"
- __type__ = "account"
+ __name__ = "MegaDebridEu"
+ __type__ = "account"
__version__ = "0.2"
__description__ = """mega-debrid.eu account plugin"""
- __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")]
+ __license__ = "GPLv3"
+ __authors__ = [("D.Ducatel", "dducatel@je-geek.fr")]
# Define the base URL of MegaDebrid api
@@ -21,17 +22,18 @@ class MegaDebridEu(Account):
data = self.getAccountData(user)
jsonResponse = req.load(self.API_URL,
get={'action': 'connectUser', 'login': user, 'password': data['password']})
- response = json_loads(jsonResponse)
+ res = json_loads(jsonResponse)
- if response['response_code'] == "ok":
- return {"premium": True, "validuntil": float(response['vip_end']), "status": True}
+ if res['response_code'] == "ok":
+ return {"premium": True, "validuntil": float(res['vip_end']), "status": True}
else:
- self.logError(response)
+ self.logError(res)
return {"status": False, "premium": False}
+
def login(self, user, data, req):
jsonResponse = req.load(self.API_URL,
get={'action': 'connectUser', 'login': user, 'password': data['password']})
- response = json_loads(jsonResponse)
- if response['response_code'] != "ok":
+ res = json_loads(jsonResponse)
+ if res['response_code'] != "ok":
self.wrongPassword()