feat: apple music -> last.fm

This commit is contained in:
Cory Dransfeldt 2023-07-26 16:37:16 -07:00
parent fc59d929b4
commit 657e21e9cd
No known key found for this signature in database
22 changed files with 88 additions and 1347 deletions

View file

@ -1,7 +1,14 @@
const ALBUM_DENYLIST = ['no-love-deep-web', 'unremittance']
module.exports = {
artist: (media) =>
`https://cdn.coryd.dev/artists/${media.replace(/\s+/g, '-').toLowerCase()}.jpg` ||
'https://cdn.coryd.dev/artists/missing-artist.jpg',
album: (media) => {
return !ALBUM_DENYLIST.includes(media.name.replace(/\s+/g, '-').toLowerCase())
? media.replace('https://lastfm.freetls.fastly.net', 'https://albums.coryd.dev')
: `https://cdn.coryd.dev/albums/${media.name.replace(/\s+/g, '-').toLowerCase()}.jpg`
},
tv: (episode) =>
`https://cdn.coryd.dev/tv/${episode.replace(':', '').replace(/\s+/g, '-').toLowerCase()}.jpg` ||
'https://cdn.coryd.dev/tv/missing-tv.jpg',