diff options
| author | 2016-08-10 17:47:04 +0200 | |
|---|---|---|
| committer | 2016-08-10 17:47:04 +0200 | |
| commit | b02ee614f059e5a6fa0f47950056b7f81aa46ed6 (patch) | |
| tree | 4af2c7511b726bfe184c27f48ecac3d5043b021b | |
| parent | [UploadedTo] Small fix (diff) | |
| download | pyload-b02ee614f059e5a6fa0f47950056b7f81aa46ed6.tar.xz | |
[MegaCoNz] fix #2567
| -rw-r--r-- | module/plugins/hoster/MegaCoNz.py | 15 | 
1 files changed, 13 insertions, 2 deletions
diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 69b19547a..a553655bb 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.44" +    __version__ = "0.45"      __status__  = "testing"      __pattern__ = r'(https?://(?:www\.)?mega(\.co)?\.nz/|mega:|chrome:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\w\-,=]+)(?:###n=(?P<OWNER>[\w^_]+))?' @@ -353,9 +353,15 @@ class MegaCoNz(Hoster):              self.log_error(_("Missing owner in URL"))              self.fail(_("Missing owner in URL")) -        self.log_debug(_("ID: %s") % id, _("Key: %s") % key, _("Type: %s") % ("public" if public else "node"), _("Owner: %s") % owner) +        self.log_debug(_("ID: %s") % id, +                       _("Key: %s") % key, +                       _("Type: %s") % ("public" if public else "node"), +                       _("Owner: %s") % owner)          key = MegaCrypto.base64_to_a32(key) +        if len(key) != 8: +            self.log_error(_("Invalid key length")) +            self.fail("Invalid key length")          mega = MegaClient(self, self.info['pattern']['OWNER'] or self.info['pattern']['ID']) @@ -386,6 +392,11 @@ class MegaCoNz(Hoster):          pyfile.name = name + self.FILE_SUFFIX          pyfile.size = res['s'] +        time_left = res.get('tl', 0) +        if time_left: +            self.log_warning(_("Free download limit reached")) +            self.retry(wait=time_left, msg="Free download limit reached") +          # self.req.http.c.setopt(pycurl.SSL_CIPHER_LIST, "RC4-MD5:DEFAULT")          self.download(res['g'])  | 
