mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-01-30 23:58:11 +00:00
fixing progress bar bug found by @CardinalPanda
This commit is contained in:
parent
146044505b
commit
4cf83dc565
@ -100,7 +100,7 @@ class Upscaler:
|
|||||||
# get number of extracted frames
|
# get number of extracted frames
|
||||||
total_frames = 0
|
total_frames = 0
|
||||||
for directory in extracted_frames_directories:
|
for directory in extracted_frames_directories:
|
||||||
total_frames += len([f for f in os.listdir(directory) if f[-4:] == '.png'])
|
total_frames += len([f for f in os.listdir(directory) if f[-4:] == f'.{self.image_format}'])
|
||||||
|
|
||||||
with tqdm(total=total_frames, ascii=True, desc='Upscaling Progress') as progress_bar:
|
with tqdm(total=total_frames, ascii=True, desc='Upscaling Progress') as progress_bar:
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ class Upscaler:
|
|||||||
while not self.progress_bar_exit_signal:
|
while not self.progress_bar_exit_signal:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
total_frames_upscaled = len([f for f in os.listdir(self.upscaled_frames) if f[-4:] == '.png'])
|
total_frames_upscaled = len([f for f in os.listdir(self.upscaled_frames) if f[-4:] == f'.{self.image_format}'])
|
||||||
delta = total_frames_upscaled - previous_cycle_frames
|
delta = total_frames_upscaled - previous_cycle_frames
|
||||||
previous_cycle_frames = total_frames_upscaled
|
previous_cycle_frames = total_frames_upscaled
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user