Skip to content

πŸ†™ Upscayl - #1 Free and Open Source AI Image Upscaler for Linux, MacOS and Windows.

Fix name logic

Nayam Amarsheaa84f7de1d00
diff --git a/electron/commands/double-upscayl.ts b/electron/commands/double-upscayl.ts
index 0a7de8e..d8c5fda 100644
--- a/electron/commands/double-upscayl.ts
+++ b/electron/commands/double-upscayl.ts
@@ -55,9 +55,14 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
const customWidth = useCustomWidth ? payload.customWidth : "";
const outFile =
- outputDir + slash + fileName + "_upscayl_" + useCustomWidth
- ? `${customWidth}px_`
- : `${scale}x_` + model + "." + saveImageAs;
+ outputDir +
+ slash +
+ fileName +
+ "_upscayl_" +
+ (useCustomWidth ? `${customWidth}px_` : `${scale}x_`) +
+ model +
+ "." +
+ saveImageAs;
// UPSCALE
let upscayl = spawnUpscayl(
diff --git a/electron/commands/image-upscayl.ts b/electron/commands/image-upscayl.ts
index 9e1f4ba..b0a175a 100644
--- a/electron/commands/image-upscayl.ts
+++ b/electron/commands/image-upscayl.ts
@@ -64,9 +64,14 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
const scale = payload.scale;
const outFile =
- outputDir + slash + fileName + "_upscayl_" + useCustomWidth
- ? `${customWidth}px_`
- : `${scale}x_` + model + "." + saveImageAs;
+ outputDir +
+ slash +
+ fileName +
+ "_upscayl_" +
+ (useCustomWidth ? `${customWidth}px_` : `${scale}x_`) +
+ model +
+ "." +
+ saveImageAs;
// UPSCALE
if (fs.existsSync(outFile) && !overwrite) {