This commit is contained in:
Cory Dransfeldt 2023-03-12 13:16:24 -07:00
parent 82604bd42b
commit 0ff72b4770
No known key found for this signature in database
11 changed files with 193 additions and 2 deletions

12
config/mediaFilters.js Normal file
View file

@ -0,0 +1,12 @@
const ALBUM_DENYLIST = ['no-love-deep-web']
module.exports = {
artist: (media) =>
`https://cdn.coryd.dev/artists/${media.replace(/\s+/g, '-').toLowerCase()}.jpg`,
album: (media) => {
const img = !ALBUM_DENYLIST.includes(media.name.replace(/\s+/g, '-').toLowerCase())
? media.image[media.image.length - 1]['#text']
: `https://cdn.coryd.dev/artists/${media.name.replace(/\s+/g, '-').toLowerCase()}.jpg`
return img
},
}