diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-10-02 21:29:03 +0200 |
---|---|---|
committer | Stefano <l.stickell@yahoo.it> | 2013-10-07 11:27:30 +0200 |
commit | 4b64e1fb3468a37bf1728267bf516ec73e145e1f (patch) | |
tree | e0b27afbad32a462247c6de328cfd0db264760c1 /pyload/plugins/hoster | |
parent | Plugins: cosmetics See #286 (diff) | |
download | pyload-4b64e1fb3468a37bf1728267bf516ec73e145e1f.tar.xz |
Merge pull request #289 from vuolter/s/hoster/MegaNz
MegaNz: bugfix https://github.com/pyload/pyload/issues/274
(cherry picked from commit b334301ba87b1004d4d4c5d2b3d054cbde475fc1)
Diffstat (limited to 'pyload/plugins/hoster')
-rw-r--r-- | pyload/plugins/hoster/MegaNz.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pyload/plugins/hoster/MegaNz.py b/pyload/plugins/hoster/MegaNz.py index db97f6859..bf4223213 100644 --- a/pyload/plugins/hoster/MegaNz.py +++ b/pyload/plugins/hoster/MegaNz.py @@ -20,7 +20,7 @@ class MegaNz(Hoster): __name__ = "MegaNz" __type__ = "hoster" __pattern__ = r"https?://([a-z0-9]+\.)?mega\.co\.nz/#!([a-zA-Z0-9!_\-]+)" - __version__ = "0.13" + __version__ = "0.14" __description__ = """mega.co.nz hoster plugin""" __author_name__ = ("RaNaN", ) __author_mail__ = ("ranan@pyload.org", ) @@ -69,8 +69,11 @@ class MegaNz(Hoster): cipher = AES.new(self.getCipherKey(key), AES.MODE_CTR, counter=ctr) self.pyfile.setStatus("decrypting") - f = open(self.lastDownload, "rb") - df = open(self.lastDownload.rsplit(self.FILE_SUFFIX)[0], "wb") + + file_crypted = self.lastDownload + file_decrypted = file_crypted.rsplit(self.FILE_SUFFIX)[0] + f = open(file_crypted, "rb") + df = open(file_decrypted, "wb") # TODO: calculate CBC-MAC for checksum @@ -84,7 +87,9 @@ class MegaNz(Hoster): f.close() df.close() - remove(self.lastDownload) + remove(file_crypted) + + self.lastDownload = file_decrypted def process(self, pyfile): |