From b5392a4ae38f02babc93279a5c9afba43de96a0c Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Thu, 23 Nov 2023 15:38:54 +0800 Subject: [PATCH] Override GOG installDir for The Witch's Love Diary --- data/manifest-override.yaml | 4 ++++ data/manifest.yaml | 1 + src/manifest.ts | 20 ++++++++++++++++---- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/data/manifest-override.yaml b/data/manifest-override.yaml index 5f8ee5d7..7d152bec 100644 --- a/data/manifest-override.yaml +++ b/data/manifest-override.yaml @@ -14,3 +14,7 @@ Overwatch: # and its save locations are identical to Counter Strike 2, # leading to duplicate backups. omit: true +The Witch's Love Diary: + installDir: + # GOG uses a different apostrophe. + The Witch’s Love Diary: {} diff --git a/data/manifest.yaml b/data/manifest.yaml index 069f1e0a..4193a0d4 100644 --- a/data/manifest.yaml +++ b/data/manifest.yaml @@ -567331,6 +567331,7 @@ The Witch's Love Diary: id: 1868296162 installDir: The Witch's Love Diary: {} + The Witch’s Love Diary: {} launch: /The Witch's Love Diary.exe: - when: diff --git a/src/manifest.ts b/src/manifest.ts index 414c03f8..7eae51c9 100644 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -216,6 +216,15 @@ function integrateOverriddenData(game: Game, override: OverriddenGame) { game.id.flatpak = override.id.flatpak; } } + + if (override.installDir) { + if (game.installDir === undefined) { + game.installDir = {}; + } + for (const key in override.installDir) { + game.installDir[key] = {}; + } + } } function hasAnyData(game: Game): boolean { @@ -246,6 +255,12 @@ export class ManifestFile extends YamlFile { const game: Game = {}; integrateWikiData(game, info); + + if (game.steam?.id !== undefined) { + const appInfo = await steamCache.getAppInfo(game.steam.id); + integrateSteamData(game, appInfo); + } + if (overridden) { integrateOverriddenData(game, overridden); } @@ -253,10 +268,7 @@ export class ManifestFile extends YamlFile { if (!hasAnyData(game)) { continue; } - if (game.steam?.id !== undefined) { - const appInfo = await steamCache.getAppInfo(game.steam.id); - integrateSteamData(game, appInfo); - } + this.data[title] = game; }