feat: last.fm -> apple music

This commit is contained in:
Cory Dransfeldt 2023-06-20 19:15:01 -07:00
parent c2905fc9fa
commit bd2aa7439c
No known key found for this signature in database
9 changed files with 280 additions and 212 deletions

View file

@ -1,16 +1,6 @@
const ALBUM_DENYLIST = ['no-love-deep-web', 'unremittance']
module.exports = {
artist: (media) =>
`https://cdn.coryd.dev/artists/${media.replace(/\s+/g, '-').toLowerCase()}.jpg`,
album: (media) => {
return !ALBUM_DENYLIST.includes(media.name.replace(/\s+/g, '-').toLowerCase())
? media.image[media.image.length - 1]['#text'].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`,
cdn: (url, host, cdn) => {