From 0cdbad886b9398f9e659d6ad25003e7b0bdca77a Mon Sep 17 00:00:00 2001 From: mtkennerly Date: Fri, 14 Aug 2020 20:09:02 -0400 Subject: [PATCH] Handle an odd intermittent issue and import recent changes from the wiki --- data/manifest.yaml | 2 +- data/wiki-game-cache.yaml | 8 ++++---- data/wiki-meta-cache.yaml | 2 +- src/wiki.ts | 4 ++++ 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/data/manifest.yaml b/data/manifest.yaml index 4a7a8c86..6cd16424 100644 --- a/data/manifest.yaml +++ b/data/manifest.yaml @@ -57599,7 +57599,7 @@ Dark Souls Remastered: id: 570940 'Dark Souls: Prepare to Die Edition': files: - /NBGI/DarkSouls/DRAKS0005.sl2: + /NBGI/DarkSouls: tags: - save when: diff --git a/data/wiki-game-cache.yaml b/data/wiki-game-cache.yaml index d0f45aa6..a741b2ad 100644 --- a/data/wiki-game-cache.yaml +++ b/data/wiki-game-cache.yaml @@ -26368,7 +26368,7 @@ Dandy Dungeon - Legend of Brave Yamada -: revId: 990633 'Danganronpa Another Episode: Ultra Despair Girls': pageId: 53714 - revId: 990690 + revId: 991573 'Danganronpa V3: Killing Harmony': pageId: 66707 revId: 964404 @@ -26932,7 +26932,7 @@ Dark Souls Remastered: revId: 991562 'Dark Souls: Prepare to Die Edition': pageId: 3367 - revId: 991216 + revId: 991575 Dark Space Conqueror: pageId: 136958 revId: 849104 @@ -47961,7 +47961,7 @@ Grooming Adventure: revId: 855510 Groove Coaster: pageId: 98224 - revId: 904710 + revId: 991571 Groove Gunner: pageId: 124542 revId: 855512 @@ -92438,7 +92438,7 @@ Rustler: revId: 868017 Rusty Hearts: pageId: 162574 - revId: 991563 + revId: 991574 Rusty Lake Hotel: pageId: 37277 revId: 964359 diff --git a/data/wiki-meta-cache.yaml b/data/wiki-meta-cache.yaml index 866c9fa1..60fe4287 100644 --- a/data/wiki-meta-cache.yaml +++ b/data/wiki-meta-cache.yaml @@ -1 +1 @@ -lastCheckedRecentChanges: '2020-08-14T23:42:10.109Z' +lastCheckedRecentChanges: '2020-08-15T00:08:12.436Z' diff --git a/src/wiki.ts b/src/wiki.ts index 8a3640de..2452eaca 100644 --- a/src/wiki.ts +++ b/src/wiki.ts @@ -504,6 +504,10 @@ export async function getGame(pageTitle: string, cache: WikiGameCache): Promise< client.api, "call", params ); const newTitle = data.pages[pageId.toString()].title; + if (newTitle === undefined) { + // This happened once intermittently; the cause is unclear. + throw new Error("Unable to retrieve page by ID"); + } console.log(`:: getGame: page ${pageId} called '${pageTitle}' renamed to '${newTitle}'`); cache[newTitle] = cache[pageTitle]; delete cache[pageTitle];