diff --git a/MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs b/MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs index cd7216c..e36887d 100644 --- a/MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs +++ b/MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs @@ -1265,6 +1265,10 @@ await Task.Run(async () => BackendSetupMainStatus = "Downloading Python..."; var download = PythonService.PYTHON_DOWNLOADS["win32"]; var targetPath = Path.Join(_pythonService.PythonDirectory, download.Filename); + if (Directory.Exists(_pythonService.PythonDirectory)) + { + Directory.Delete(_pythonService.PythonDirectory, true); + } Directory.CreateDirectory(_pythonService.PythonDirectory); await Downloader.DownloadFileAsync(download.Url, targetPath, (progress) => { diff --git a/MangaJaNaiConverterGui/backend/src/run_upscale.py b/MangaJaNaiConverterGui/backend/src/run_upscale.py index a6f5933..7241a2f 100644 --- a/MangaJaNaiConverterGui/backend/src/run_upscale.py +++ b/MangaJaNaiConverterGui/backend/src/run_upscale.py @@ -558,7 +558,7 @@ def save_image( args = {"Q": int(lossy_compression_quality)} if image_format in {"webp"}: args["lossless"] = use_lossless_compression - pyvips.Image.new_from_array(image).write_to_file(f".{image_format}", **args) + pyvips.Image.new_from_array(image).write_to_file(output_file_path, **args) def preprocess_worker_archive(