1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-21 21:19:31 +01:00

Fix model ID for high fidelity and update file protocol path handling for development mode

This commit is contained in:
Nayam Amarshe 2024-12-25 14:11:00 +05:30
parent 9af5158d8c
commit 4347196efb
2 changed files with 7 additions and 2 deletions

View File

@ -6,7 +6,7 @@ export const MODELS = {
id: "upscayl-lite-4x", id: "upscayl-lite-4x",
}, },
"high-fidelity-4x": { "high-fidelity-4x": {
id: "hfa2k-4x", id: "high-fidelity-4x",
}, },
"remacri-4x": { "remacri-4x": {
id: "remacri-4x", id: "remacri-4x",

View File

@ -35,7 +35,12 @@ app.on("ready", async () => {
}); });
protocol.registerFileProtocol("public", (request, callback) => { protocol.registerFileProtocol("public", (request, callback) => {
const filePath = decodeURI(request.url.replace("public:///", "")); const filePath = decodeURI(request.url.replace("public:///", ""));
const asarPath = path.join(app.getAppPath(), "renderer", "out", filePath); const asarPath = path.join(
app.getAppPath(),
"renderer",
process.env.NODE_ENV === "development" ? "public" : "out",
filePath,
);
callback(asarPath); callback(asarPath);
}); });
logit("🚃 App Path: ", app.getAppPath()); logit("🚃 App Path: ", app.getAppPath());