mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-30 18:24:27 +01:00
Add null check on metadata, Continue upscayl if metadata readig failed
This commit is contained in:
parent
dee6763af0
commit
e914543235
@ -56,7 +56,6 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
|
||||
ELECTRON_COMMANDS.UPSCAYL_ERROR,
|
||||
"Failed to read metadata.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
// COPY IMAGE TO TMP FOLDER
|
||||
@ -141,7 +140,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
|
||||
if (!mainWindow) return;
|
||||
if (!failed2 && !stopped) {
|
||||
try {
|
||||
await writeMetadata(outFile, metadata, exiftool);
|
||||
if (metadata) await writeMetadata(outFile, metadata, exiftool);
|
||||
} catch (error) {
|
||||
logit("❌ Error writing metadata: ", error);
|
||||
mainWindow.webContents.send(
|
||||
|
@ -58,7 +58,6 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
|
||||
ELECTRON_COMMANDS.UPSCAYL_ERROR,
|
||||
"Failed to read metadata.",
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const outFile =
|
||||
@ -159,7 +158,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
|
||||
const onClose = async () => {
|
||||
if (!failed && !stopped) {
|
||||
try {
|
||||
await writeMetadata(outFile, metadata, exiftool);
|
||||
if (metadata) await writeMetadata(outFile, metadata, exiftool);
|
||||
} catch (error) {
|
||||
logit("❌ Error writing metadata: ", error);
|
||||
mainWindow.webContents.send(
|
||||
|
Loading…
Reference in New Issue
Block a user