From c0eb46f72c1cc82a6e0e386d44c43151c01fa183 Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Sat, 10 Jan 2015 15:44:33 +0100 Subject: [MegaCoNz] Fix https://github.com/pyload/pyload/issues/1017 (thx valadrem) --- module/plugins/hoster/MegaCoNz.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'module') diff --git a/module/plugins/hoster/MegaCoNz.py b/module/plugins/hoster/MegaCoNz.py index 9e23e0361..fbd34c563 100644 --- a/module/plugins/hoster/MegaCoNz.py +++ b/module/plugins/hoster/MegaCoNz.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -import math import os import random import re @@ -49,7 +48,7 @@ from module.utils import decode, fs_decode, fs_encode class MegaCoNz(Hoster): __name__ = "MegaCoNz" __type__ = "hoster" - __version__ = "0.25" + __version__ = "0.26" __pattern__ = r'(?:https?://(?:www\.)?mega\.co\.nz/|mega:|chrome:.+?)#(?PN|)!(?P[\w^_]+)!(?P[\w,\\-]+)' @@ -130,7 +129,7 @@ class MegaCoNz(Hoster): chunk_size = 2 ** 15 # buffer size, 32k # file_mac = [0, 0, 0, 0] # calculate CBC-MAC for checksum - chunks = int(math.ceil(os.path.getsize(file_crypted) / chunk_size)) + chunks = os.path.getsize(file_crypted) / chunk_size + 1 for i in xrange(chunks): buf = f.read(chunk_size) if not buf: -- cgit v1.2.3