cbz2ebook: Use mt map for opening image and zip
This apparently solves some weird issues with reading the zip file like zlib.error: Error -3 while decompressing data: invalid block type zlib.error: Error -3 while decompressing data: invalid distance too far back Though it reduced the amount of times this happened, some files still persistently refuse to be read by zipfile in parallel. In those cases, using `-s` to force single-threading should be sufficient.
parent
bcfa304862
commit
2ad7f3a52e
|
@ -70,7 +70,7 @@ else:
|
||||||
|
|
||||||
for idx, im in enumerate(
|
for idx, im in enumerate(
|
||||||
tqdm(
|
tqdm(
|
||||||
mapper(process_image, map(Image.open, map(srczip.open, srcfiles)),),
|
mapper(process_image, mapper(Image.open, mapper(srczip.open, srcfiles)),),
|
||||||
total=len(srcfiles),
|
total=len(srcfiles),
|
||||||
)
|
)
|
||||||
):
|
):
|
||||||
|
|
Loading…
Reference in New Issue