diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2022-02-25 22:01:01 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2022-02-25 22:01:01 -0400 |
commit | 6e2df0d972dcfa45be1e5f7f070fdebb969f4498 (patch) | |
tree | 25bb8a3be3a31a86902ab81e6fa5db609b9a4ce2 /src/page | |
parent | a7281f12ee5fc52f8b748bb1fb555a057e8e6677 (diff) |
fill out data for artist pages + internal tweaks
Diffstat (limited to 'src/page')
-rw-r--r-- | src/page/artist.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/page/artist.js b/src/page/artist.js index d0128050..6a465604 100644 --- a/src/page/artist.js +++ b/src/page/artist.js @@ -61,7 +61,7 @@ export function write(artist, {wikiData}) { }); const artListChunks = chunkByProperties(sortByDate(artThingsAll.flatMap(thing => - (['coverArtists', 'wallpaperArtists', 'bannerArtists'] + (['coverArtistContribs', 'wallpaperArtistContribs', 'bannerArtistContribs'] .map(key => getArtistsAndContrib(thing, key)) .filter(({ contrib }) => contrib) .map(props => ({ @@ -91,14 +91,14 @@ export function write(artist, {wikiData}) { date: +track.date, album: track.album, duration: track.duration, - artists: (track.artists.some(({ who }) => who === artist) - ? track.artists.filter(({ who }) => who !== artist) - : track.contributors.filter(({ who }) => who !== artist)), + artists: (track.artistContribs.some(({ who }) => who === artist) + ? track.artistContribs.filter(({ who }) => who !== artist) + : track.contributorContribs.filter(({ who }) => who !== artist)), contrib: { who: artist, what: [ - track.artists.find(({ who }) => who === artist)?.what, - track.contributors.find(({ who }) => who === artist)?.what + track.artistContribs.find(({ who }) => who === artist)?.what, + track.contributorContribs.find(({ who }) => who === artist)?.what ].filter(Boolean).join(', ') } })), ['date', 'album']) @@ -138,7 +138,7 @@ export function write(artist, {wikiData}) { // want to show the full list of other contri8utors inline. // (It can often 8e very, very large!) artists: [], - contrib: flash.contributors.find(({ who }) => who === artist) + contrib: flash.contributorContribs.find(({ who }) => who === artist) })), ['act']) .map(({ act, chunk }) => ({ act, chunk, @@ -241,21 +241,21 @@ export function write(artist, {wikiData}) { return { albums: { - asCoverArtist: artist.albumsAsCoverArtist?.map(serializeArtistsAndContrib('coverArtists')), - asWallpaperArtist: artist.albumsAsWallpaperArtist?.map(serializeArtistsAndContrib('wallpaperArtists')), - asBannerArtist: artist.albumsAsBannerArtist?.map(serializeArtistsAndContrib('bannerArtists')) + asCoverArtist: artist.albumsAsCoverArtist?.map(serializeArtistsAndContrib('coverArtistContribs')), + asWallpaperArtist: artist.albumsAsWallpaperArtist?.map(serializeArtistsAndContrib('wallpaperArtistContribs')), + asBannerArtist: artist.albumsAsBannerArtist?.map(serializeArtistsAndContrib('bannerArtistContribs')) }, flashes: wikiInfo.enableFlashesAndGames ? { asContributor: (artist.flashesAsContributor - ?.map(flash => getArtistsAndContrib(flash, 'contributors')) + ?.map(flash => getArtistsAndContrib(flash, 'contributorContribs')) .map(({ contrib, thing: flash }) => ({ link: serializeLink(flash), contribution: contrib.what }))) } : null, tracks: { - asArtist: artist.tracksAsArtist.map(serializeArtistsAndContrib('artists')), - asContributor: artist.tracksAsContributor.map(serializeArtistsAndContrib('contributors')), + asArtist: artist.tracksAsArtist.map(serializeArtistsAndContrib('artistContribs')), + asContributor: artist.tracksAsContributor.map(serializeArtistsAndContrib('contributorContribs')), chunked: { released: serializeTrackListChunks(releasedTrackListChunks), unreleased: serializeTrackListChunks(unreleasedTrackListChunks) |