From 6b3158673476ec929cd2e9179afce5218220b614 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 19 Jun 2024 23:01:16 -0300 Subject: [PATCH 1/3] fix: images not loading with local protocol --- src/main/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index 10399beb..760b8283 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -53,8 +53,8 @@ app.whenReady().then(async () => { electronApp.setAppUserModelId("site.hydralauncher.hydra"); protocol.handle("local", (request) => { - const filePath = request.url.slice("local://".length); - return net.fetch(url.pathToFileURL(filePath).toString()); + const filePath = request.url.slice("local:".length); + return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString()); }); await dataSource.initialize(); From e4f1abaa5a0261b0b19e59919d4f72055664de63 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Thu, 20 Jun 2024 00:01:39 -0300 Subject: [PATCH 2/3] fix: merge with remote games not updating local games correctly --- src/main/services/library-sync/merge-with-remote-games.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/services/library-sync/merge-with-remote-games.ts b/src/main/services/library-sync/merge-with-remote-games.ts index e31310fc..8790318f 100644 --- a/src/main/services/library-sync/merge-with-remote-games.ts +++ b/src/main/services/library-sync/merge-with-remote-games.ts @@ -32,10 +32,12 @@ export const mergeWithRemoteGames = async () => { { objectID: game.objectId, shop: "steam", + }, + { + remoteId: game.id, lastTimePlayed: updatedLastTimePlayed, playTimeInMilliseconds: updatedPlayTime, - }, - { remoteId: game.id } + } ); } else { const steamGame = await steamGamesWorker.run(Number(game.objectId), { From b60d9aa4dbfeb05fdcf5aa136096fc0c5b36b562 Mon Sep 17 00:00:00 2001 From: JackEnx Date: Thu, 20 Jun 2024 09:11:17 -0300 Subject: [PATCH 3/3] fix: memory usage --- src/main/workers/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/workers/index.ts b/src/main/workers/index.ts index cbcedaff..b0f9721f 100644 --- a/src/main/workers/index.ts +++ b/src/main/workers/index.ts @@ -11,6 +11,7 @@ export const steamGamesWorker = new Piscina({ workerData: { steamGamesPath: path.join(seedsPath, "steam-games.json"), }, + maxThreads: 1, }); export const downloadSourceWorker = new Piscina({