mirror of
https://github.com/upscayl/upscayl.git
synced 2025-01-19 17:28:44 +01:00
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import { ChildProcessWithoutNullStreams } from "child_process";
|
|
|
|
export let imagePath: string | undefined = "";
|
|
export let folderPath: string | undefined = undefined;
|
|
export let customModelsFolderPath: string | undefined = undefined;
|
|
export let outputFolderPath: string | undefined = undefined;
|
|
export let saveOutputFolder = false;
|
|
export let compression = 0;
|
|
export let overwrite = false;
|
|
export let stopped = false;
|
|
export let childProcesses: {
|
|
process: ChildProcessWithoutNullStreams;
|
|
kill: () => boolean;
|
|
}[] = [];
|
|
|
|
export function setImagePath(value: string | undefined): void {
|
|
imagePath = value;
|
|
}
|
|
|
|
export function setFolderPath(value: string | undefined): void {
|
|
folderPath = value;
|
|
}
|
|
|
|
export function setCustomModelsFolderPath(value: string | undefined): void {
|
|
customModelsFolderPath = value;
|
|
}
|
|
|
|
// SETTERS
|
|
export function setOutputFolderPath(value: string | undefined): void {
|
|
outputFolderPath = value;
|
|
}
|
|
|
|
export function setSaveOutputFolder(value: boolean): void {
|
|
saveOutputFolder = value;
|
|
}
|
|
|
|
export function setCompression(value: number): void {
|
|
compression = value;
|
|
}
|
|
|
|
export function setOverwrite(value: boolean): void {
|
|
overwrite = value;
|
|
}
|
|
|
|
export function setStopped(value: boolean): void {
|
|
stopped = value;
|
|
}
|
|
|
|
export function setChildProcesses(value: {
|
|
process: ChildProcessWithoutNullStreams;
|
|
kill: () => boolean;
|
|
}): void {
|
|
childProcesses.push(value);
|
|
}
|