diff options
author | (quasar) nebula <towerofnix@gmail.com> | 2021-01-12 12:31:33 -0400 |
---|---|---|
committer | (quasar) nebula <towerofnix@gmail.com> | 2021-01-12 12:31:33 -0400 |
commit | 0b20efeb113fd51291dee3e4cfa76e044c22ce2e (patch) | |
tree | 0e18401871df400216bf6feb6c24e8feb7540386 /common | |
parent | 8a7cb1edff25ba3e612d7c24b07cc776ff8738d6 (diff) |
traversing fandom
Diffstat (limited to 'common')
-rw-r--r-- | common/common.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/common.js b/common/common.js index 5db5ad95..4ee73a14 100644 --- a/common/common.js +++ b/common/common.js @@ -77,12 +77,16 @@ const C = { ABOUT_DIRECTORY: 'about', FEEDBACK_DIRECTORY: 'feedback', CHANGELOG_DIRECTORY: 'changelog', + DISCORD_DIRECTORY: 'discord', + DONATE_DIRECTORY: 'donate', FLASH_DIRECTORY: 'flash', NEWS_DIRECTORY: 'news', GROUP_DIRECTORY: 'group', JS_DISABLED_DIRECTORY: 'js-disabled', UNRELEASED_TRACKS_DIRECTORY: 'unreleased-tracks', + OFFICIAL_GROUP_DIRECTORY: 'official', + FANDOM_GROUP_DIRECTORY: 'fandom', // This function was originally made to sort just al8um data, 8ut its exact // code works fine for sorting tracks too, so I made the varia8les and names @@ -124,7 +128,11 @@ const C = { // "directories", we just reformat the artist's name. getArtistDirectory: artistName => C.getKebabCase(artistName), - getArtistNumContributions: artist => (artist.tracks.length + artist.albums.length + artist.flashes.length), + getArtistNumContributions: artist => ( + artist.tracks.asAny.length + + artist.albums.asCoverArtist.length + + artist.flashes.asContributor.length + ), getArtistCommentary: (artist, {justEverythingMan}) => justEverythingMan.filter(thing => thing.commentary && thing.commentary.replace(/<\/?b>/g, '').includes('<i>' + artist.name + ':</i>')) }; |