summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar GamaC0de <nitzo2001@yahoo.com> 2016-06-18 20:37:20 +0200
committerGravatar GamaC0de <nitzo2001@yahoo.com> 2016-06-18 20:37:20 +0200
commitd5033eabab0de75a00abb675d3b20e280f16a4e9 (patch)
treedc85171df1999d13e5ee8438d360a1f0f70ebbbc
parent[ShareLinksBiz] fix #2501 (diff)
downloadpyload-d5033eabab0de75a00abb675d3b20e280f16a4e9.tar.xz
[MegaCoNz] Update
-rw-r--r--module/plugins/hoster/MegaCoNz.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py
index 205708fee..69b19547a 100644
--- a/module/plugins/hoster/MegaCoNz.py
+++ b/module/plugins/hoster/MegaCoNz.py
@@ -225,7 +225,7 @@ class MegaClient(object):
class MegaCoNz(Hoster):
__name__ = "MegaCoNz"
__type__ = "hoster"
- __version__ = "0.43"
+ __version__ = "0.44"
__status__ = "testing"
__pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w\-,=]+)(?:###n=(?P<OWNER>[\w^_]+))?'
@@ -362,14 +362,16 @@ class MegaCoNz(Hoster):
#: G is for requesting a download url
#: This is similar to the calls in the mega js app, documentation is very bad
if public:
- res = mega.api_response(a="g", g=1, p=id, ssl=1)[0]
+ res = mega.api_response(a="g", g=1, p=id, ssl=1)
else:
- res = mega.api_response(a="g", g=1, n=id, ssl=1)[0]
+ res = mega.api_response(a="g", g=1, n=id, ssl=1)
if isinstance(res, int):
mega.check_error(res)
- elif "e" in res:
- mega.check_error(res['e'])
+ elif isinstance(res, list):
+ res = res[0]
+ if "e" in res:
+ mega.check_error(res['e'])
attr = MegaCrypto.decrypt_attr(res['at'], key)
if not attr: