Skip to content

Commit

Permalink
Merge pull request #47 from the-database/dev
Browse files Browse the repository at this point in the history
delete existing python before updating
  • Loading branch information
the-database authored Nov 28, 2024
2 parents 182a25b + ce5571a commit a14ec81
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions MangaJaNaiConverterGui/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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) =>
{
Expand Down
2 changes: 1 addition & 1 deletion MangaJaNaiConverterGui/backend/src/run_upscale.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a14ec81

Please sign in to comment.