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.
Simon Bruder 2021-07-11 11:27:57 +02:00
parent bcfa304862
commit 2ad7f3a52e
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
1 changed files with 1 additions and 1 deletions

View File

@ -70,7 +70,7 @@ else:
for idx, im in enumerate(
tqdm(
mapper(process_image, map(Image.open, map(srczip.open, srcfiles)),),
mapper(process_image, mapper(Image.open, mapper(srczip.open, srcfiles)),),
total=len(srcfiles),
)
):