Merge branch 'rc/v2.0' of github.com:hydralauncher/hydra into rc/v2.0

This commit is contained in:
Chubby Granny Chaser 2024-06-20 13:22:28 +01:00
commit 8a9892bdbe
No known key found for this signature in database
3 changed files with 7 additions and 4 deletions

View File

@ -52,8 +52,8 @@ app.whenReady().then(async () => {
electronApp.setAppUserModelId("site.hydralauncher.hydra"); electronApp.setAppUserModelId("site.hydralauncher.hydra");
protocol.handle("local", (request) => { protocol.handle("local", (request) => {
const filePath = request.url.slice("local://".length); const filePath = request.url.slice("local:".length);
return net.fetch(url.pathToFileURL(filePath).toString()); return net.fetch(url.pathToFileURL(decodeURI(filePath)).toString());
}); });
await dataSource.initialize(); await dataSource.initialize();

View File

@ -32,10 +32,12 @@ export const mergeWithRemoteGames = async () => {
{ {
objectID: game.objectId, objectID: game.objectId,
shop: "steam", shop: "steam",
},
{
remoteId: game.id,
lastTimePlayed: updatedLastTimePlayed, lastTimePlayed: updatedLastTimePlayed,
playTimeInMilliseconds: updatedPlayTime, playTimeInMilliseconds: updatedPlayTime,
}, }
{ remoteId: game.id }
); );
} else { } else {
const steamGame = await steamGamesWorker.run(Number(game.objectId), { const steamGame = await steamGamesWorker.run(Number(game.objectId), {

View File

@ -11,6 +11,7 @@ export const steamGamesWorker = new Piscina({
workerData: { workerData: {
steamGamesPath: path.join(seedsPath, "steam-games.json"), steamGamesPath: path.join(seedsPath, "steam-games.json"),
}, },
maxThreads: 1,
}); });
export const downloadSourceWorker = new Piscina({ export const downloadSourceWorker = new Piscina({