From ce3b69dce08a64159f93e158d31111150d998696 Mon Sep 17 00:00:00 2001 From: K4YT3X Date: Tue, 26 Mar 2019 10:18:43 -0400 Subject: [PATCH] fixed resolution bug --- bin/upscaler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/upscaler.py b/bin/upscaler.py index 29b0e51..8cee4d2 100644 --- a/bin/upscaler.py +++ b/bin/upscaler.py @@ -75,7 +75,7 @@ class Upscaler: for directory in [self.extracted_frames, self.upscaled_frames]: try: - print('Cleaning up cache directory: {}'.format()) + print('Cleaning up cache directory: {}'.format(directory)) shutil.rmtree(directory) except (OSError, FileNotFoundError): pass @@ -290,8 +290,8 @@ class Upscaler: if self.scale_ratio: coded_width = video_info['streams'][video_stream_index]['coded_width'] coded_height = video_info['streams'][video_stream_index]['coded_height'] - self.scale_width = self.scale_ratio * coded_width - self.scale_height = self.scale_ratio * coded_height + self.scale_width = int(self.scale_ratio * coded_width) + self.scale_height = int(self.scale_ratio * coded_height) # upscale images one by one using waifu2x Avalon.info('Starting to upscale extracted images')