From 8a7cb1edff25ba3e612d7c24b07cc776ff8738d6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 8 Jan 2021 00:15:37 -0400 Subject: okay so like, hear me out here this commit isnt QUITE done but its in a working state, and i just had the scariest vision of accidentally discarding all my work via git mishap, yknow? even though im not doing anything funky with git! so yall get this commit early and its goin on line but im not pushing it to the site til its done. no spoilering yourself (even though ive already posted most of the cool things in the discord) <3 --- common/common.js | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'common') diff --git a/common/common.js b/common/common.js index 6c21dfc..5db5ad9 100644 --- a/common/common.js +++ b/common/common.js @@ -79,6 +79,7 @@ const C = { CHANGELOG_DIRECTORY: 'changelog', FLASH_DIRECTORY: 'flash', NEWS_DIRECTORY: 'news', + GROUP_DIRECTORY: 'group', JS_DISABLED_DIRECTORY: 'js-disabled', UNRELEASED_TRACKS_DIRECTORY: 'unreleased-tracks', @@ -123,22 +124,9 @@ const C = { // "directories", we just reformat the artist's name. getArtistDirectory: artistName => C.getKebabCase(artistName), - getThingsArtistContributedTo: (artistName, {allTracks, albumData, flashData}) => [ - ...allTracks.filter(track => [ - ...track.artists, - ...track.contributors, - ...track.coverArtists || [] - ].some(({ who }) => who === artistName)), - ...flashData.filter(flash => (flash.contributors || []).some(({ who }) => who === artistName)), - ...albumData.filter(album => - (album.coverArtists || []).some(({ who }) => who === artistName)) - ], - - getArtistNumContributions: (artistName, {allTracks, albumData, flashData}) => ( - C.getThingsArtistContributedTo(artistName, {allTracks, albumData, flashData}).length - ), - - getArtistCommentary: (artistName, {justEverythingMan}) => justEverythingMan.filter(thing => thing.commentary && thing.commentary.replace(/<\/?b>/g, '').includes('' + artistName + ':')) + getArtistNumContributions: artist => (artist.tracks.length + artist.albums.length + artist.flashes.length), + + getArtistCommentary: (artist, {justEverythingMan}) => justEverythingMan.filter(thing => thing.commentary && thing.commentary.replace(/<\/?b>/g, '').includes('' + artist.name + ':')) }; if (typeof module === 'object') { -- cgit 1.3.0-6-gf8a5