mirror of
https://github.com/k4yt3x/video2x.git
synced 2025-02-01 08:38:12 +00:00
fixing converter frame filename issues
This commit is contained in:
parent
9be46f7d62
commit
807276fcc3
@ -4,7 +4,7 @@
|
||||
Name: Video2X Upscaler
|
||||
Author: K4YT3X
|
||||
Date Created: December 10, 2018
|
||||
Last Modified: July 27, 2019
|
||||
Last Modified: August 3, 2019
|
||||
|
||||
Dev: SAT3LL
|
||||
|
||||
@ -131,7 +131,7 @@ class Upscaler:
|
||||
if self.total_frames_upscaled >= self.total_frames:
|
||||
return
|
||||
|
||||
# adds the detla into the progress bar
|
||||
# adds the delta into the progress bar
|
||||
progress_bar.update(delta)
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
@ -170,7 +170,7 @@ class Upscaler:
|
||||
|
||||
w2.upscale(self.extracted_frames, self.upscaled_frames, self.scale_ratio, self.threads, self.image_format, self.upscaler_exceptions)
|
||||
for image in [f for f in self.upscaled_frames.iterdir() if f.is_file()]:
|
||||
renamed = re.sub(f'_\[.*-.*\]\[x(\d+(\.\d+)?)\]\.{self.image_format}', f'.{self.image_format}', image)
|
||||
renamed = re.sub(f'_\[.*-.*\]\[x(\d+(\.\d+)?)\]\.{self.image_format}', f'.{self.image_format}', str(image))
|
||||
(self.upscaled_frames / image).rename(self.upscaled_frames / renamed)
|
||||
|
||||
self.progress_bar_exit_signal = True
|
||||
|
@ -48,15 +48,6 @@ class Waifu2xConverter:
|
||||
# overwrite config file settings
|
||||
self.waifu2x_settings['input'] = input_directory
|
||||
self.waifu2x_settings['output'] = output_directory
|
||||
|
||||
# temporary fix for https://github.com/DeadSix27/waifu2x-converter-cpp/issues/109
|
||||
"""
|
||||
self.waifu2x_settings['i'] = input_directory
|
||||
self.waifu2x_settings['o'] = output_directory
|
||||
self.waifu2x_settings['input'] = None
|
||||
self.waifu2x_settings['output'] = None
|
||||
"""
|
||||
|
||||
self.waifu2x_settings['scale-ratio'] = scale_ratio
|
||||
self.waifu2x_settings['jobs'] = jobs
|
||||
self.waifu2x_settings['output-format'] = image_format
|
||||
|
Loading…
Reference in New Issue
Block a user