feat: artist genres

This commit is contained in:
Cory Dransfeldt 2023-07-21 14:18:00 -07:00
parent af96a35a38
commit fc344837cf
No known key found for this signature in database
5 changed files with 932 additions and 4 deletions

View file

@ -1,5 +1,13 @@
{ {
"aliases": [ "aliases": [
{
"artist": "Aesop Rock",
"aliases": ["Aesop Rock & Homeboy Sandman", "Aesop Rock & Blockhead"]
},
{
"artist": "Fen",
"aliases": ["Sleepwalker & Fen"]
},
{ {
"artist": "Osees", "artist": "Osees",
"aliases": ["OCS", "The Ohsees", "Thee Oh Sees", "Thee Oh See's"] "aliases": ["OCS", "The Ohsees", "Thee Oh Sees", "Thee Oh See's"]
@ -7,10 +15,6 @@
{ {
"artist": "Tom Waits", "artist": "Tom Waits",
"aliases": ["Tom Waits & Crystal Gayle", "Crystal Gayle"] "aliases": ["Tom Waits & Crystal Gayle", "Crystal Gayle"]
},
{
"artist": "Fen",
"aliases": ["Sleepwalker & Fen"]
} }
] ]
} }

View file

@ -0,0 +1,915 @@
{
"Punk": [
"+44",
"wire",
"sex-pistols",
"rkl",
"refused",
"propagandhi",
"the-pogues",
"nomeansno",
"nofx",
"misfits",
"minutemen",
"minor-threat",
"joyce-manor",
"jello-biafra-with-nomeansno",
"j-church",
"hüsker-dü",
"green-day",
"fugazi",
"fake-names",
"descendents",
"deep-turtle",
"death-from-above-1979",
"dead-kennedys",
"cock-sparrer",
"coachwhips",
"cloud-nothings",
"the-clash",
"box-car-racer",
"blink-182",
"black-flag",
"bad-religion",
"bad-brains",
"afi"
],
"Black Metal": [
"zhrine",
"yellow-eyes",
"wormlust",
"woods-of-ypres",
"woods-of-desolation",
"wolves-in-the-throne-room",
"white-ward",
"weakling",
"vital-spirit",
"ved-buens-ende...",
"vaura",
"unanimated",
"ultha",
"ultar",
"trna",
"tómarúm",
"tod-huetet-uebel",
"thou,-mizmor-&-emma-ruth-rundle",
"thantifaxath",
"tardigrada",
"svartidauði",
"sunken",
"stormkeep",
"skáphe",
"sinmara",
"the-silver",
"show-me-a-dinosaur",
"sacramentum",
"rebirth-of-nefast",
"pillorian",
"panopticon",
"outre",
"ossuaire",
"örmagna",
"olhava",
"odraza",
"oathbreaker",
"numenorean",
"nordicwinter",
"noltem",
"moonsorrow",
"møl",
"mizmor-&-thou",
"mizmor-&-andrew-black",
"mizmor",
"misþyrming",
"mgła",
"mare-cognitum",
"mannveira",
"lunar-aurora",
"lantlôs",
"kriegsmaschine",
"krallice",
"kostnatění",
"karg",
"hræ",
"helfró",
"harakiri-for-the-sky",
"grey-waters",
"gravenchalice",
"furia",
"fen",
"falls-of-rauros",
"enslaved",
"emperor",
"embrace-of-thorns",
"drudkh",
"drought",
"deathspell-omega",
"deafheaven",
"the-clearing-path",
"celeste",
"carpe-noctem",
"bosse-de-nage",
"blut-aus-nord",
"behemoth",
"an-autumn-for-crippled-children",
"au-dessus",
"ash-borer",
"arcturus",
"aosoth",
"aoratos",
"andavald",
"amesoeurs",
"altar-of-plagues",
"akhlys",
"agalloch",
"afsky"
],
"Death Metal": [
"zealotry",
"xysma",
"xoth",
"xenomorph",
"wretched-fate",
"worthless",
"worm",
"wombbath",
"witherscape",
"witch-vomit",
"weeping-sores",
"warp-chamber",
"vrenth",
"vorum",
"voimaton",
"voidceremony",
"void-terror",
"void-rot",
"vircolac",
"vertebra-atlantis",
"venomous-skeleton",
"vengeful",
"venenum",
"vasaeleth",
"vader",
"vacuous",
"vacivus",
"unleashed",
"universally-estranged",
"undersave",
"undergang",
"under-the-church",
"undeath",
"unbounded-terror",
"unaussprechlichen-kulten",
"unanimated",
"ulthar",
"úlfúð",
"ulcerate",
"turris-eburnea",
"tumba-de-carne",
"tribulation",
"trenchrot",
"transgressor",
"toughness",
"totten-korps",
"torchure",
"tomb-mold",
"timeghoul",
"tiamat",
"therion",
"thergothon",
"thanatos",
"temisto",
"teleport",
"teitanblood",
"teeth",
"taphos",
"sxuperion",
"sweven",
"swallowed",
"suppression",
"superstition",
"sunless",
"sulphurous",
"sulphur-aeon",
"suffocation",
"suffering-hour",
"stench",
"stargazer",
"spectral-voice",
"spawn-of-possession",
"spasme",
"sororicide",
"sorcery",
"sonne-adam",
"solothus",
"snorlax",
"sněť",
"slugathor",
"skullcrush",
"skeletal-remains",
"skeletal",
"sinister",
"siderean",
"shub-niggurath",
"shards-of-humanity",
"setentia",
"sermon-of-flames",
"seputus",
"sepulcher",
"sentient-horror",
"sentenced",
"sedimentum",
"seance",
"scythian",
"scorched",
"sarmat",
"runemagick",
"rune",
"rottrevore",
"rotted",
"rothadás",
"ritual-necromancy",
"ripping-corpse",
"ripped-to-shreds",
"resurgency",
"reptilian",
"replicant",
"reeking-aura",
"ravenous-death",
"rapture",
"question",
"qrixkuor",
"pyrrhon",
"pyrexia",
"pyre",
"putrescine",
"purtenance",
"pungent-stench",
"psycroptic",
"possessed",
"portal",
"poisonous",
"plague-bearer",
"phrenelith",
"phobophilic",
"pestilength",
"perilaxe-occlusion",
"pan.thy.monium",
"outre-tombe",
"outer-heaven",
"ossuarium",
"orthodoxy",
"oksennus",
"of-feather-and-bone",
"obscure-infinity",
"obscura",
"obscene",
"obliveon",
"obliteration",
"obituary",
"nucleus",
"nothingness",
"noisem",
"nocturnus",
"nithing",
"nihilist",
"nex-carnis",
"neuraxis",
"nekrovault",
"nekrofilth",
"negativa",
"necrovorous",
"necrovore",
"necrovation",
"necrot",
"necros-christos",
"necrophobic",
"necrophiliac",
"napalm-death",
"moss-upon-the-skull",
"mortuous",
"mortuary",
"mortiferum",
"mortem",
"mortal-incarnation",
"morta-skuld",
"morpheus-descends",
"morgue",
"mordicus",
"morbus-chron",
"morbid-angel",
"monstrosity",
"molested",
"mitochondrion",
"mithridatum",
"mithras",
"miscreance",
"miasma",
"merciless",
"megaslaughter",
"mefitis",
"master",
"massacre",
"martyr",
"malignant-altar",
"malevolent-creation",
"lykathea-aflame",
"lurid-panacea",
"lunar-chamber",
"luciferion",
"lost-harvest",
"last-sacrament",
"lantern",
"krypts",
"kronos",
"kralizec",
"krabathor",
"killing-addiction",
"khthoniik-cerviiks",
"kever",
"karmacipher",
"jumpin'-jesus",
"jordablod",
"intellect-devourer",
"innumerable-forms",
"infester",
"infernal-coil",
"inculter",
"incantation",
"inanna",
"imprecation",
"imperial-triumphant",
"impaler",
"immortalis",
"immolation",
"ignivomous",
"hypocrisy",
"hyperdontia",
"howls-of-ebb",
"howls-of-ebb",
"hour-of-penance",
"horror-god",
"hooded-menace",
"hissing",
"hideous-divinity",
"heaving-earth",
"haunter",
"hail-of-bullets",
"gutvoid",
"gutter-instinct",
"grenadier",
"graveyard",
"graveside",
"grave-ritual",
"grave-miasma",
"grave-infestation",
"grave",
"gosudar",
"gorguts",
"gorephilia",
"gorefest",
"golgothan-remains",
"gold-spire",
"god-macabre",
"glacial-tomb",
"gigan",
"ghoulgotha",
"ghastly",
"gateway",
"garroted",
"galvanizer",
"funeral-leech",
"funebre",
"funebrarum",
"fuming-mouth",
"frozen-soul",
"flourishing",
"fleshgod-apocalypse",
"fleshcrawl",
"fetid",
"faceless-burial",
"exlimitir",
"execration",
"excruciate",
"evilyn",
"eucharist",
"eternal-dirge",
"epitaph",
"entombed",
"engulfed",
"encoffination",
"encenathrakh",
"emptiness",
"electrocution",
"egregore",
"edge-of-sanity",
"dream-unending",
"dragged-into-sunlight",
"dormant-ordeal",
"dominus-xul",
"domains",
"dismember",
"disma",
"diskord",
"disincarnate",
"disharmonic-orchestra",
"disembarkation",
"disciples-of-mockery",
"disastrous-murmur",
"dig-that-body-up,-it's-alive!",
"devoid-of-thought",
"deteriorate",
"desultory",
"desolation-realm",
"desecresy",
"depravity",
"demilich",
"demigod",
"demented-ted",
"deiquisitor",
"deicide",
"degial",
"defeated-sanity",
"defacement",
"deceased",
"decaying-purity",
"death",
"dead-congregation",
"darkthrone",
"cryptworm",
"cryptopsy",
"cryptic-shift",
"cryptborn",
"crypt-of-kerberos",
"cruciamentum",
"cosmovore",
"cosmic-putrefaction",
"cosmic-atrophy",
"coscradh",
"corpsessed",
"convulsing",
"convulse",
"contaminated",
"concrete-winds",
"comecon",
"coffincraft",
"coffin-texts",
"coffin-curse",
"cianide",
"chthe'ilist",
"the-chasm",
"chapel-of-disease",
"chaotian",
"chainsword",
"cerebral-rot",
"centinex",
"cenotaph",
"cemetery-filth",
"cemetary",
"carnal-tomb",
"carnage",
"carcinoma",
"carcass",
"carbonized",
"cancer",
"cambion",
"cadaveric-fumes",
"cadaver",
"burial-invocation",
"brutality",
"broken-hope",
"borgia",
"bolt-thrower",
"bog-body",
"bloodsoaked-necrovoid",
"bloodbath",
"blood-spore",
"blood-incantation",
"black-curse",
"benediction",
"behemoth",
"bedsore",
"baphomet",
"backyard-mortuary",
"azath",
"autopsy",
"autophagy",
"authorize",
"augury",
"atrocity",
"atheist",
"atemporal",
"ataraxy",
"astriferous",
"asphyx",
"appalling-spawn",
"anatomia",
"amputory",
"amorphis",
"altered-dead",
"altars-ablaze",
"altars",
"altarage",
"agony",
"afflicted",
"aeviterne",
"adversarial",
"adramelech",
"ad-vitam-infernal",
"ad-nauseam",
"acrostichon",
"acephalix",
"accidental-suicide",
"abhorrence"
],
"Classic Rock": [
"yes",
"traveling-wilburys",
"tom-petty-and-the-heartbreakers",
"tom-petty",
"rush",
"pink-floyd",
"king-crimson",
"grave",
"bruce-springsteen"
],
"Alternative": ["year-of-the-rabbit", "failure", "the-cranberries", "bob-mould"],
"Sludge Metal": [
"yautja",
"yashira",
"thou-&-the-body",
"thou-&-mizmor",
"thou-&-emma-ruth-rundle",
"thou",
"sumac",
"primitive-man",
"neurosis",
"kowloon-walled-city",
"keiji-haino-&-sumac",
"inter-arma",
"full-of-hell-&-primitive-man",
"chat-pile",
"acid-bath"
],
"Indie": [
"the-xx",
"will-sheff",
"sufjan-stevens",
"the-stone-roses",
"the-postal-service",
"p.-wolf-and-avi",
"okkervil-river",
"neutral-milk-hotel",
"the-japanese-house",
"iron-&-wine",
"the-head-and-the-heart",
"golden-shoulders",
"frightened-rabbit",
"bright-eyes",
"bon-iver",
"blind-pilot",
"big-red-machine",
"better-oblivion-community-center",
"all-time-quarterback"
],
"Indie Rock": [
"the-wytches",
"wavves-&-cloud-nothings",
"the-war-on-drugs",
"thom-yorke",
"teenage-fanclub",
"rogue-wave",
"the-replacements",
"radiohead",
"radioactivity",
"pixies",
"pedro-the-lion",
"pedro-the-lion",
"pavement",
"okkervil-river",
"nova-mob",
"no",
"the-national",
"matt-berninger",
"marked-men",
"the-kills",
"jay-farrar-and-benjamin-gibbard",
"japandroids",
"interpol",
"hop-along",
"the-halo-benders",
"frances-quinlan",
"el-vy",
"death-cab-for-cutie",
"dredg",
"doug-martsch",
"the-dismemberment-plan",
"dinosaur-jr.",
"death-from-above-1979",
"death-cab-for-cutie",
"death-cab-for-cutie",
"damien-jurado",
"cloud-nothings",
"built-to-spill",
"built-to-spill",
"boygenius",
"atoms-for-peace",
"arcade-fire"
],
"Emo": [
"worst-party-ever",
"the-wonder-years",
"turnover",
"title-fight",
"tigers-jaw",
"taking-back-sunday",
"state-lines",
"spanish-love-songs",
"sincere-engineer",
"seahaven",
"rites-of-spring",
"prince-daddy-&-the-hyena",
"pity-sex",
"pinegrove",
"oso-oso",
"the-newfound-interest-in-connecticut",
"my-chemical-romance",
"michael-cera-palin",
"macseal",
"knuckle-puck",
"joyce-manor",
"jimmy-eat-world",
"jawbreaker",
"the-hotelier",
"hot-mulligan",
"home-is-where",
"have-mercy",
"the-get-up-kids",
"free-throw",
"fiddlehead",
"fall-out-boy",
"drive-like-jehu",
"dogleg",
"charmer",
"can't-swim",
"the-brave-little-abacus",
"brand-new",
"basement",
"balance-and-composure",
"the-ataris",
"anxious",
"american-football",
"alkaline-trio"
],
"Grindcore": [
"wormrot",
"terrorizer",
"rotten-sound",
"regional-justice-center",
"pig-destroyer",
"napalm-death",
"nails",
"knelt-rote",
"full-of-hell-&-merzbow",
"full-of-hell",
"fawn-limbs",
"dephosphorus",
"dead-in-the-dirt",
"cloud-rat",
"cianide",
"caustic-wound",
"carcass",
"the-body-&-full-of-hell"
],
"Shoegaze": [
"whirr",
"the-verve",
"trauma-ray",
"teenage-wrist",
"swervedriver",
"soul-blind",
"slowdive",
"slow-crush",
"ringo-deathstarr",
"ride",
"pale-saints",
"nothing",
"narrow-head",
"my-bloody-valentine",
"m83",
"just-mustard",
"ison",
"hum",
"greet-death",
"gleemer",
"glare",
"glare",
"drop-nineteens",
"deafcult",
"corps-fleur",
"cloakroom",
"chapterhouse",
"catherine-wheel",
"black-wing",
"beach-house",
"autolux",
"asobi-seksu",
"all-under-heaven",
"all-natural-lemon-&-lime-flavors",
"alcest",
"airiel"
],
"Rock": [
"webbed-wing",
"violent-femmes",
"superheaven",
"superbloom",
"sonic-youth",
"the-smashing-pumpkins",
"sebadoh",
"oasis",
"nirvana",
"kim-gordon-&-j-mascis",
"katatonia",
"jimmy-eat-world",
"foo-fighters",
"counting-crows",
"audioslave"
],
"Progressive Black Metal": [
"waste-of-space-orchestra",
"oranssi-pazuzu",
"negură-bunget",
"ivar-bjørnson-&-einar-selvik",
"ihsahn",
"enslaved"
],
"Progressive Metal": [
"virus",
"unexpect",
"ulver",
"sunn-o)))-&-ulver",
"sculptured",
"opeth",
"maudlin-of-the-well",
"mastodon",
"disillusion",
"dan-swanö",
"cynic",
"cult-of-luna",
"anathema"
],
"Progressive Rock": [
"unicorn",
"steven-wilson",
"riverside",
"porcupine-tree",
"nightingale",
"the-mars-volta",
"lunatic-soul"
],
"Post Rock": [
"unconditional-arms",
"this-will-destroy-you",
"sigur-rós",
"red-sparowes",
"of-the-vine",
"mono",
"mogwai",
"long-distance-calling-&-leech",
"long-distance-calling",
"if-these-trees-could-talk",
"godspeed-you!-black-emperor",
"god-is-an-astronaut",
"explosions-in-the-sky",
"caspian"
],
"Hip-Hop": [
"the-uncluded",
"run-the-jewels",
"pusha-t",
"mckinley-dixon",
"malibu-ken",
"kendrick-lamar",
"injury-reserve",
"hail-mary-mallon",
"el-p",
"death-grips",
"chance-the-rapper",
"aesop-rock"
],
"Indie Pop": ["two-door-cinema-club", "the-smiths"],
"Soundtrack": ["trent-reznor-&-atticus-ross", "mogwai"],
"Country": [
"trampled-by-turtles",
"trampled-by-turtles",
"sunday-valley",
"sturgill-simpson",
"johnny-cash",
"hiss-golden-messenger"
],
"Post Hardcore": [
"touché-amoré",
"thrice",
"self-defense-family",
"seahaven",
"rival-schools",
"quicksand",
"pitchfork",
"modern-color",
"militarie-gun",
"la-dispute",
"jawbox",
"hot-snakes",
"hell-is-for-heroes",
"gospel",
"fleshwater",
"envy",
"drug-church",
"drive-like-jehu",
"birds-in-row",
"big-garden",
"at-the-drive-in"
],
"Singer/Songwriter": [
"tom-waits",
"sun-kil-moon",
"soccer-mommy",
"sharon-van-etten",
"ryan-adams",
"phoebe-bridgers",
"kermit-obert",
"j-mascis",
"giles-corey",
"elliott-smith",
"dan-campbell",
"damien-jurado",
"city-and-colour",
"bob-dylan",
"ben-gibbard"
],
"Grind": ["terrorizer"],
"Pop": ["taylor-swift"],
"Post Punk": [
"talking-heads",
"soft-kill",
"shiner",
"savages",
"revenge-sf",
"the-psychedelic-furs",
"protomartyr",
"peter-&-the-test-tube-babies",
"new-order",
"modern-english",
"mission-of-burma",
"joy-division",
"the-jesus-and-mary-chain",
"idles",
"have-a-nice-life",
"hands-of-anne-boleyn",
"echo-&-the-bunnymen",
"damaged-bug",
"the-cure",
"cold-showers",
"the-chameleons",
"centaur"
],
"Jazz": ["sword-&-sandals", "miles-davis", "mahavishnu-orchestra", "bohren-&-der-club-of-gore"],
"Screamo": ["state-faults", "senza", "ostraca", "loma-prieta", "frail-body"],
"Ambient": ["stars-of-the-lid", "eluvium", "the-dead-texan"],
"Post Metal": [
"spotlights",
"russian-circles",
"mouth-of-the-architect",
"mono",
"lantlôs",
"jesu",
"isis",
"holy-fawn",
"envy",
"cult-of-luna"
],
"Noise Rock": ["sonic-youth", "a-place-to-bury-strangers", "pink-&-brown", "metz", "the-drums"],
"Folk": ["simon-&-garfunkel"],
"Thrash Metal": ["sadus", "kreator"],
"Hardcore": ["refused"],
"Metalcore": [
"portrayal-of-guilt",
"loathe",
"hacksaw-to-the-throat",
"glassing",
"fuming-mouth",
"converge-&-chelsea-wolfe",
"converge",
"chat-pile",
"cave-in"
],
"Psychedelic Rock": ["osees", "john-dwyer", "bent-arcana"],
"Industrial": ["nine-inch-nails"],
"Synthpop": ["m83"],
"Electronic": ["lcd-soundsystem", "jesu-/-sun-kil-moon", "jamie-xx", "depeche-mode"],
"Doom Metal": ["katatonia"],
"Industrial Metal": ["godflesh"],
"Alternative Metal": ["deftones"],
"Melodic Death Metal": ["dark-tranquillity", "carcass", "at-the-gates", "arsis"]
}

View file

@ -1,8 +1,10 @@
const { S3Client, GetObjectCommand, PutObjectCommand } = require('@aws-sdk/client-s3') const { S3Client, GetObjectCommand, PutObjectCommand } = require('@aws-sdk/client-s3')
const _ = require('lodash') const _ = require('lodash')
const artistAliases = require('./json/artist-aliases.json') const artistAliases = require('./json/artist-aliases.json')
const artistGenres = require('./json/artist-genres.json')
const titleCaseExceptions = require('./json/title-case-exceptions.json') const titleCaseExceptions = require('./json/title-case-exceptions.json')
const { getReadableData } = require('../utils/aws') const { getReadableData } = require('../utils/aws')
const { getKeyByValue } = require('../utils/arrays')
/** /**
* Accepts a string representing an artist name, checks to see if said artist name * Accepts a string representing an artist name, checks to see if said artist name
@ -128,6 +130,7 @@ const deriveCharts = (tracks) => {
if (!charts.artists[track.artist]) { if (!charts.artists[track.artist]) {
charts.artists[track.artist] = { charts.artists[track.artist] = {
artist: track.artist, artist: track.artist,
genre: getKeyByValue(artistGenres, track.artist.replace(/\s+/g, '-').toLowerCase()),
url: `https://rateyourmusic.com/search?searchterm=${encodeURI(track.artist)}`, url: `https://rateyourmusic.com/search?searchterm=${encodeURI(track.artist)}`,
plays: 1, plays: 1,
} }

View file

@ -10,6 +10,9 @@
<div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-purple-500 bg-cover-gradient dark:border-purple-400 dark:hover:border-purple-500"></div> <div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-purple-500 bg-cover-gradient dark:border-purple-400 dark:hover:border-purple-500"></div>
<div class="absolute left-1 bottom-2 drop-shadow-md"> <div class="absolute left-1 bottom-2 drop-shadow-md">
<div class="px-1 text-xs font-bold text-white line-clamp-2">{{ artist.artist }}</div> <div class="px-1 text-xs font-bold text-white line-clamp-2">{{ artist.artist }}</div>
<div class="px-1 text-xs text-white">
{{ artist.genre }}
</div>
</div> </div>
{%- capture artistImg %}{{ artist.artist | artist }}{% endcapture -%} {%- capture artistImg %}{{ artist.artist | artist }}{% endcapture -%}
{%- capture artistName %}{{ artist.artist | escape }}{% endcapture -%} {%- capture artistName %}{{ artist.artist | escape }}{% endcapture -%}

3
src/utils/arrays.js Normal file
View file

@ -0,0 +1,3 @@
module.exports = {
getKeyByValue: (object, value) => Object.keys(object).find((key) => object[key].includes(value)),
}