mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-12 01:40:53 +01:00
Fix localstorage bug
This commit is contained in:
parent
12c62f9b54
commit
f144421999
@ -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));
|
||||
|
||||
|
@ -98,7 +98,6 @@ const convertAndScale = async (
|
||||
.toFile(processedImagePath);
|
||||
} catch (error) {
|
||||
logit("❌ Error converting to: ", saveImageAs, error);
|
||||
onError(error);
|
||||
}
|
||||
|
||||
logit("✅ Done converting to: ", upscaledImagePath);
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user