fix pdf progress meter when it's not the first collation item

This commit is contained in:
xenofem 2024-04-23 22:25:10 -04:00
parent faa9a30e8b
commit 287686da78

View file

@ -552,7 +552,7 @@ class Collator:
file_path = self.dest / f'{idx:04d}.{image["ext"]}'
with open(file_path, 'wb') as f:
f.write(image["image"])
count_progress(idx, len(image_extractors), 'pages collated')
count_progress(idx - self.index, len(image_extractors), 'pages collated')
self.index += pdf.page_count
return True