From e32ca61eb351155524a5ba0c272b26cdc85a8203 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 3 Jan 2022 23:32:45 -0400 Subject: normal bug fixes --- src/upd8.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/upd8.js b/src/upd8.js index a7058395..d2e6c3aa 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -2724,7 +2724,9 @@ async function main() { if (!contrib.who) { const orig = originalContribStrings.get(contrib); logWarn`Post-process: Contributor ${orig} didn't match any artist data - in ${thing.name} (key: ${key})`; + return false; } + return true; })); } }; @@ -2823,6 +2825,10 @@ async function main() { } } + // Process contributors before artist data, because a bunch of artist data + // will depend on accessing the values postprocessContributors() updates. + postprocessContributors(); + for (const artist of WD.artistData) { const filterProp = (array, prop) => array.filter(thing => thing[prop]?.some(({ who }) => who === artist)); const filterCommentary = array => array.filter(thing => thing.commentary && thing.commentary.replace(/<\/?b>/g, '').includes('' + artist.name + ':')); @@ -2849,8 +2855,6 @@ async function main() { } } - postprocessContributors(); - WD.officialAlbumData = WD.albumData.filter(album => album.groups.some(group => group.directory === OFFICIAL_GROUP_DIRECTORY)); WD.fandomAlbumData = WD.albumData.filter(album => album.groups.every(group => group.directory !== OFFICIAL_GROUP_DIRECTORY)); -- cgit 1.3.0-6-gf8a5