From 77883bc12bba1df2d577494054395cc71f27a158 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Mon, 29 May 2023 23:17:55 -0300 Subject: [PATCH 1/3] Fix platform fetchin size when adding gog games to download --- src/backend/storeManagers/gog/library.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/backend/storeManagers/gog/library.ts b/src/backend/storeManagers/gog/library.ts index 935495686b..e05cefe469 100644 --- a/src/backend/storeManagers/gog/library.ts +++ b/src/backend/storeManagers/gog/library.ts @@ -16,6 +16,7 @@ import { GogInstallInfo, GOGGameDotIdFile, GOGClientsResponse, + GogInstallPlatform, GamesDBData, Library, BuildItem @@ -374,9 +375,11 @@ export function getInstallAndGameInfo(slug: string): GameInfo | undefined { */ export async function getInstallInfo( appName: string, - installPlatform = 'windows', + installPlatform: GogInstallPlatform = 'windows', lang = 'en-US' ): Promise { + installPlatform = installPlatform.toLowerCase() as GogInstallPlatform + if (installInfoStore.has(`${appName}_${installPlatform}`)) { const cache = installInfoStore.get(`${appName}_${installPlatform}`) if (cache) { From 94dffd2b840ad22dbe9e7c19057834d04836b640 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Mon, 29 May 2023 23:21:13 -0300 Subject: [PATCH 2/3] Fix linter --- src/backend/storeManagers/gog/library.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/backend/storeManagers/gog/library.ts b/src/backend/storeManagers/gog/library.ts index e05cefe469..5a5b0e225d 100644 --- a/src/backend/storeManagers/gog/library.ts +++ b/src/backend/storeManagers/gog/library.ts @@ -16,7 +16,6 @@ import { GogInstallInfo, GOGGameDotIdFile, GOGClientsResponse, - GogInstallPlatform, GamesDBData, Library, BuildItem @@ -375,10 +374,10 @@ export function getInstallAndGameInfo(slug: string): GameInfo | undefined { */ export async function getInstallInfo( appName: string, - installPlatform: GogInstallPlatform = 'windows', + installPlatform = 'windows', lang = 'en-US' ): Promise { - installPlatform = installPlatform.toLowerCase() as GogInstallPlatform + installPlatform = installPlatform.toLowerCase() if (installInfoStore.has(`${appName}_${installPlatform}`)) { const cache = installInfoStore.get(`${appName}_${installPlatform}`) From f8f9267b309effe30469a3130ec307bdc522e569 Mon Sep 17 00:00:00 2001 From: Ariel Juodziukynas Date: Tue, 30 May 2023 08:46:59 -0300 Subject: [PATCH 3/3] Update src/backend/storeManagers/gog/library.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Flávio Fearn --- src/backend/storeManagers/gog/library.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/storeManagers/gog/library.ts b/src/backend/storeManagers/gog/library.ts index 5a5b0e225d..389f7080ae 100644 --- a/src/backend/storeManagers/gog/library.ts +++ b/src/backend/storeManagers/gog/library.ts @@ -378,6 +378,12 @@ export async function getInstallInfo( lang = 'en-US' ): Promise { installPlatform = installPlatform.toLowerCase() + if (installPlatform === 'linux') { + installPlatform = 'windows' + } + if (installPlatform === 'mac') { + installPlatform = 'osx' + } if (installInfoStore.has(`${appName}_${installPlatform}`)) { const cache = installInfoStore.get(`${appName}_${installPlatform}`)