1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-09-23 19:08:25 +02:00

Fix localstorage bug

This commit is contained in:
Nayam Amarshe 2024-01-16 14:52:31 +05:30
parent 12c62f9b54
commit f144421999
4 changed files with 5 additions and 6 deletions

View File

@ -3,6 +3,7 @@ import { getMainWindow } from "../main-window";
import {
childProcesses,
customModelsFolderPath,
fetchLocalStorage,
noImageProcessing,
saveOutputFolder,
setCompression,
@ -31,7 +32,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
const model = payload.model;
const gpuId = payload.gpuId;
const saveImageAs = payload.saveImageAs as ImageFormat;
console.log("PAYLOAD: ", payload);
// GET THE IMAGE DIRECTORY
let inputDir = payload.batchFolderPath;
// GET THE OUTPUT DIRECTORY
@ -39,7 +40,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
if (saveOutputFolder === true && outputFolderPath) {
outputFolderPath = outputFolderPath;
}
// ! Don't do fetchLocalStorage() again, it causes the values to be reset
setNoImageProcessing(payload.noImageProcessing);
setCompression(parseInt(payload.compression));

View File

@ -98,7 +98,6 @@ const convertAndScale = async (
.toFile(processedImagePath);
} catch (error) {
logit("❌ Error converting to: ", saveImageAs, error);
onError(error);
}
logit("✅ Done converting to: ", upscaledImagePath);

View File

@ -1,8 +1,7 @@
import { Notification } from "electron/main";
import { fetchLocalStorage, turnOffNotifications } from "./config-variables";
import { turnOffNotifications } from "./config-variables";
export default function showNotification(title: string, body: string) {
fetchLocalStorage();
if (turnOffNotifications) return;
new Notification({
title,

View File

@ -2,7 +2,7 @@
"productName": "Upscayl",
"appId": "org.upscayl.Upscayl",
"afterSign": "./notarize.js",
"buildVersion": "24.01.17",
"buildVersion": "24.01.18",
"asar": true,
"asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/**/*"],
"extraFiles": [