chore: unify mbid data
This commit is contained in:
parent
1e3d9ed5a7
commit
fadc85449d
4 changed files with 26 additions and 14 deletions
|
@ -1,20 +1,8 @@
|
||||||
const EleventyFetch = require('@11ty/eleventy-fetch')
|
const EleventyFetch = require('@11ty/eleventy-fetch')
|
||||||
|
const mbidPatches = require('./json/mbid-patches.json')
|
||||||
|
|
||||||
const mbidMap = (artist) => {
|
const mbidMap = (artist) => {
|
||||||
const map = {
|
return mbidPatches[artist.toLowerCase()] || ''
|
||||||
afi: '1c3919b2-43ca-4a4a-935d-9d50135ec0ef',
|
|
||||||
'carpe noctem': 'aa349181-1cb9-4340-bb3f-82eefba3e697',
|
|
||||||
cruciamentum: '9a783663-db0c-4237-a3a9-afe72d055ddc',
|
|
||||||
'edge of sanity': '82d1972f-f815-480d-ba78-9873b799bdd1',
|
|
||||||
fumes: 'a5139ca1-f4f3-4bea-ae4c-ae4e2efd857d',
|
|
||||||
ghastly: '70f969df-7fc1-421e-afad-678c0bbd1aea',
|
|
||||||
krallice: 'b4e4b359-76a3-447e-be1d-80a24887134e',
|
|
||||||
osees: '194272cc-dcc8-4640-a4a6-66da7d250d5c',
|
|
||||||
panopticon: 'd9b1f00a-31a7-4f64-9f29-8481e7be8911',
|
|
||||||
'pigment vehicle': 'c421f86c-991c-4b2d-9058-516375903deb',
|
|
||||||
worm: '6313658e-cd68-4c81-9778-17ce3825748e',
|
|
||||||
}
|
|
||||||
return map[artist.toLowerCase()] || ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = async function () {
|
module.exports = async function () {
|
||||||
|
|
13
src/_data/json/mbid-patches.json
Normal file
13
src/_data/json/mbid-patches.json
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"afi": "1c3919b2-43ca-4a4a-935d-9d50135ec0ef",
|
||||||
|
"carpe noctem": "aa349181-1cb9-4340-bb3f-82eefba3e697",
|
||||||
|
"cruciamentum": "9a783663-db0c-4237-a3a9-afe72d055ddc",
|
||||||
|
"edge of sanity": "82d1972f-f815-480d-ba78-9873b799bdd1",
|
||||||
|
"fumes": "a5139ca1-f4f3-4bea-ae4c-ae4e2efd857d",
|
||||||
|
"ghastly": "70f969df-7fc1-421e-afad-678c0bbd1aea",
|
||||||
|
"krallice": "b4e4b359-76a3-447e-be1d-80a24887134e",
|
||||||
|
"osees": "194272cc-dcc8-4640-a4a6-66da7d250d5c",
|
||||||
|
"panopticon": "d9b1f00a-31a7-4f64-9f29-8481e7be8911",
|
||||||
|
"pigment vehicle": "c421f86c-991c-4b2d-9058-516375903deb",
|
||||||
|
"worm": "6313658e-cd68-4c81-9778-17ce3825748e"
|
||||||
|
}
|
5
src/_data/mbidPatches.js
Normal file
5
src/_data/mbidPatches.js
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
const mbidPatches = require('./json/mbid-patches.json')
|
||||||
|
|
||||||
|
module.exports = async function () {
|
||||||
|
return mbidPatches
|
||||||
|
}
|
6
src/api/mbids.liquid
Normal file
6
src/api/mbids.liquid
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
layout: null
|
||||||
|
eleventyExcludeFromCollections: true
|
||||||
|
permalink: /api/mbids
|
||||||
|
---
|
||||||
|
{{ mbidPatches | json }}
|
Reference in a new issue