From ae067efd5ec20c441493457511e831e93f3b3e1e Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Wed, 14 May 2025 08:42:50 -0300 Subject: [PATCH] feat: delay SystemPath validations --- src/main/main.ts | 4 ++-- src/main/services/library-sync/upload-games-batch.ts | 2 +- src/main/services/system-path.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/main.ts b/src/main/main.ts index b0e142fc..313087ce 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -18,8 +18,6 @@ import { } from "@main/services"; export const loadState = async () => { - SystemPath.checkIfPathsAreAvailable(); - const userPreferences = await db.get( levelKeys.userPreferences, { @@ -77,4 +75,6 @@ export const loadState = async () => { startMainLoop(); CommonRedistManager.downloadCommonRedist(); + + SystemPath.checkIfPathsAreAvailable(); }; diff --git a/src/main/services/library-sync/upload-games-batch.ts b/src/main/services/library-sync/upload-games-batch.ts index 95b843c9..3593ac11 100644 --- a/src/main/services/library-sync/upload-games-batch.ts +++ b/src/main/services/library-sync/upload-games-batch.ts @@ -15,7 +15,7 @@ export const uploadGamesBatch = async () => { ); }); - const gamesChunks = chunk(games, 50); + const gamesChunks = chunk(games, 30); for (const chunk of gamesChunks) { await HydraApi.post( diff --git a/src/main/services/system-path.ts b/src/main/services/system-path.ts index 17359f32..32b34e11 100644 --- a/src/main/services/system-path.ts +++ b/src/main/services/system-path.ts @@ -38,7 +38,7 @@ export class SystemPath { try { return app.getPath(pathName); } catch (error) { - logger.error(`Error getting path: ${error}`); + console.error(`Error getting path: ${error}`); return ""; } }