mirror of
https://github.com/upscayl/upscayl.git
synced 2024-11-24 15:40:21 +01:00
25 lines
625 B
TypeScript
25 lines
625 B
TypeScript
|
import COMMAND from "../constants/commands";
|
||
|
import mainWindow from "../main-window";
|
||
|
import {
|
||
|
getCustomModelsFolderPath,
|
||
|
setCustomModelsFolderPath,
|
||
|
} from "../utils/config-variables";
|
||
|
import getModels from "../utils/get-models";
|
||
|
import logit from "../utils/logit";
|
||
|
|
||
|
const getModelsList = async (event, payload) => {
|
||
|
if (!mainWindow) return;
|
||
|
if (payload) {
|
||
|
setCustomModelsFolderPath(payload);
|
||
|
|
||
|
logit("📁 Custom Models Folder Path: ", getCustomModelsFolderPath());
|
||
|
|
||
|
mainWindow.webContents.send(
|
||
|
COMMAND.CUSTOM_MODEL_FILES_LIST,
|
||
|
getModels(payload)
|
||
|
);
|
||
|
}
|
||
|
};
|
||
|
|
||
|
export default getModelsList;
|