summaryrefslogtreecommitdiffstats
path: root/module/plugins/hoster/MegaCoNz.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-10 15:44:33 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-10 15:44:33 +0100
commitc0eb46f72c1cc82a6e0e386d44c43151c01fa183 (patch)
treec13c083504d34be33ea140c3ccc62a5299f02836 /module/plugins/hoster/MegaCoNz.py
parent[FilefactoryComFolder] Fix https://github.com/pyload/pyload/issues/961 (diff)
downloadpyload-c0eb46f72c1cc82a6e0e386d44c43151c01fa183.tar.xz
[MegaCoNz] Fix https://github.com/pyload/pyload/issues/1017 (thx valadrem)
Diffstat (limited to 'module/plugins/hoster/MegaCoNz.py')
-rw-r--r--module/plugins/hoster/MegaCoNz.py5
1 files changed, 2 insertions, 3 deletions
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:.+?)#(?P<TYPE>N|)!(?P<ID>[\w^_]+)!(?P<KEY>[\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: