Fix progress bar update logic

This commit is contained in:
Your Name
2025-12-26 23:30:21 +07:00
parent 8776b05f11
commit e40ad68b9b
+5 -8
View File
@@ -122,15 +122,12 @@ class BatchSaveImageSequenceWebP:
if skip_identical:
seen_hashes[h] = path
# Update pbar immediately for "processed" tasks,
# strictly speaking, we should update when future is done,
# but for UX responsiveness it's often fine to update on submission
# OR we iterate futures differently.
# Let's simple update here as we 'processed' the decision to save.
pbar.update(1)
# Wait for all to finish ensuring files are properly closed
for f in futures:
# Update pbar as tasks complete
from concurrent.futures import as_completed
for f in as_completed(futures):
pbar.update(1)
# Check for exceptions
f.result()
return (saved_paths,)