mirror of
https://github.com/upscayl/upscayl.git
synced 2026-04-25 03:00:05 -04:00
Merge upstream/main into feat/ctrl-v
This commit is contained in:
@@ -14,7 +14,7 @@ import { modelsPath } from "../utils/get-resource-paths";
|
||||
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
|
||||
import { BatchUpscaylPayload } from "../../common/types/types";
|
||||
import showNotification from "../utils/show-notification";
|
||||
import { DEFAULT_MODELS } from "../../common/models-list";
|
||||
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
|
||||
|
||||
const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
|
||||
const mainWindow = getMainWindow();
|
||||
@@ -41,7 +41,7 @@ const batchUpscayl = async (event, payload: BatchUpscaylPayload) => {
|
||||
fs.mkdirSync(outputFolderPath, { recursive: true });
|
||||
}
|
||||
|
||||
const isDefaultModel = DEFAULT_MODELS.includes(model);
|
||||
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
|
||||
|
||||
// UPSCALE
|
||||
const upscayl = spawnUpscayl(
|
||||
|
||||
@@ -18,7 +18,7 @@ import { ELECTRON_COMMANDS } from "../../common/electron-commands";
|
||||
import { DoubleUpscaylPayload } from "../../common/types/types";
|
||||
import { ImageFormat } from "../types/types";
|
||||
import showNotification from "../utils/show-notification";
|
||||
import { DEFAULT_MODELS } from "../../common/models-list";
|
||||
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
|
||||
import getFilenameFromPath from "../../common/get-file-name";
|
||||
import decodePath from "../../common/decode-path";
|
||||
import getDirectoryFromPath from "../../common/get-directory-from-path";
|
||||
@@ -41,7 +41,7 @@ const doubleUpscayl = async (event, payload: DoubleUpscaylPayload) => {
|
||||
const fullfileName = getFilenameFromPath(imagePath);
|
||||
const fileName = parse(fullfileName).name;
|
||||
|
||||
const isDefaultModel = DEFAULT_MODELS.includes(model);
|
||||
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
|
||||
|
||||
// COPY IMAGE TO TMP FOLDER
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { getMainWindow } from "../main-window";
|
||||
import { ImageUpscaylPayload } from "../../common/types/types";
|
||||
import { ImageFormat } from "../types/types";
|
||||
import showNotification from "../utils/show-notification";
|
||||
import { DEFAULT_MODELS } from "../../common/models-list";
|
||||
import { DEFAULT_MODELS_ID_LIST } from "../../common/models-list";
|
||||
import getFilenameFromPath from "../../common/get-file-name";
|
||||
import decodePath from "../../common/decode-path";
|
||||
import getDirectoryFromPath from "../../common/get-directory-from-path";
|
||||
@@ -55,7 +55,7 @@ const imageUpscayl = async (event, payload: ImageUpscaylPayload) => {
|
||||
"." +
|
||||
saveImageAs;
|
||||
|
||||
const isDefaultModel = DEFAULT_MODELS.includes(model);
|
||||
const isDefaultModel = DEFAULT_MODELS_ID_LIST.includes(model);
|
||||
|
||||
// Check if windows can write the new filename to the file system
|
||||
if (outFile.length >= 255) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import log from "electron-log";
|
||||
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
|
||||
import { getMainWindow } from "../main-window";
|
||||
import { ELECTRON_COMMANDS } from "../../common/electron-commands";
|
||||
|
||||
const logit = (...args: any) => {
|
||||
const mainWindow = getMainWindow();
|
||||
|
||||
Reference in New Issue
Block a user