diff options
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-x | src/upd8.js | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/upd8.js b/src/upd8.js index eaf6b435..af3d107f 100755 --- a/src/upd8.js +++ b/src/upd8.js @@ -952,13 +952,20 @@ async function main() { Object.assign(wikiData, wikiDataResult); { - const logThings = (thingDataProp, label) => - logInfo` - ${wikiData[thingDataProp]?.length ?? colors.red('(Missing!)')} ${colors.normal(colors.dim(label))}`; + const logThings = (prop, label) => { + const array = + (Array.isArray(prop) + ? prop + : wikiData[prop]); + + logInfo` - ${array?.length ?? colors.red('(Missing!)')} ${colors.normal(colors.dim(label))}`; + } + try { logInfo`Loaded data and processed objects:`; logThings('albumData', 'albums'); logThings('trackData', 'tracks'); - logThings('artistData', 'artists'); + logThings(wikiData.artistData.filter(artist => !artist.isAlias), 'artists'); if (wikiData.flashData) { logThings('flashData', 'flashes'); logThings('flashActData', 'flash acts'); @@ -1050,7 +1057,7 @@ async function main() { // Needed for sorting 'date', 'tracks', // Needed for computing page paths - 'commentary', 'coverArtistContribs', + 'aliasedArtist', 'commentary', 'coverArtistContribs', ]), artTagData: new Set([ @@ -1058,11 +1065,6 @@ async function main() { 'isContentWarning', ]), - artistAliasData: new Set([ - // Needed for computing page paths - 'aliasedArtist', - ]), - flashData: new Set([ // Needed for sorting 'act', 'date', |