diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-01-08 00:15:37 -0400 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-01-08 00:15:37 -0400 |
commit | 8a7cb1edff25ba3e612d7c24b07cc776ff8738d6 (patch) | |
tree | 3a0fd54a103d340fd2d39f67620daea85eca2682 /common | |
parent | 8aa973e5b4c22b34dfa6256f716ff872d8dad042 (diff) |
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
Diffstat (limited to 'common')
-rw-r--r-- | common/common.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/common/common.js b/common/common.js index 6c21dfcb..5db5ad95 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('<i>' + artistName + ':</i>')) + 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('<i>' + artist.name + ':</i>')) }; if (typeof module === 'object') { |