From 2d9c5fe751eb38826f7b04f4d6d2c8146af6dafd Mon Sep 17 00:00:00 2001 From: k4yt3x Date: Sat, 9 May 2020 05:39:40 -0400 Subject: [PATCH] fixed custom cache path loading issues --- src/video2x.py | 2 +- src/video2x_gui.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video2x.py b/src/video2x.py index 36addbc..bc25631 100755 --- a/src/video2x.py +++ b/src/video2x.py @@ -184,7 +184,7 @@ ffmpeg_settings['ffmpeg_path'] = os.path.expandvars(ffmpeg_settings['ffmpeg_path # load video2x settings image_format = config['video2x']['image_format'].lower() preserve_frames = config['video2x']['preserve_frames'] -video2x_cache_directory = config['video2x']['video2x_cache_directory'] +video2x_cache_directory = pathlib.Path(config['video2x']['video2x_cache_directory']) # overwrite driver_settings with driver_args if driver_args is not None: diff --git a/src/video2x_gui.py b/src/video2x_gui.py index bcda9cc..72099d9 100755 --- a/src/video2x_gui.py +++ b/src/video2x_gui.py @@ -362,8 +362,8 @@ class Video2XMainWindow(QMainWindow): # set cache directory path if self.config['video2x']['video2x_cache_directory'] is None: - video2x_cache_directory = str((pathlib.Path(tempfile.gettempdir()) / 'video2x').absolute()) - self.cache_line_edit.setText(video2x_cache_directory) + self.config['video2x']['video2x_cache_directory'] = str((pathlib.Path(tempfile.gettempdir()) / 'video2x').absolute()) + self.cache_line_edit.setText(self.config['video2x']['video2x_cache_directory']) # load preserve frames settings self.preserve_frames_check_box.setChecked(self.config['video2x']['preserve_frames'])