Fix k4yt3x#211 bug

This commit is contained in:
劃破黑夜
2020-03-17 22:01:56 +08:00
committed by GitHub
parent 5753ea8f52
commit 2ba0e951f9
2 changed files with 5 additions and 7 deletions

View File

@@ -352,7 +352,7 @@ image_format = config['video2x']['image_format'].lower()
preserve_frames = config['video2x']['preserve_frames']
# load cache directory
if isinstance(config['video2x']['video2x_cache_directory'], str):
if config['video2x']['video2x_cache_directory'] is not None:
video2x_cache_directory = pathlib.Path(config['video2x']['video2x_cache_directory'])
else:
video2x_cache_directory = pathlib.Path(tempfile.gettempdir()) / 'video2x'