chore: perf improvements
This commit is contained in:
parent
bb9a086c32
commit
de5cb2db8b
4 changed files with 21 additions and 6 deletions
|
@ -5,7 +5,13 @@ module.exports = {
|
|||
`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']
|
||||
: `https://cdn.coryd.dev/artists/${media.name.replace(/\s+/g, '-').toLowerCase()}.jpg`
|
||||
? 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`
|
||||
},
|
||||
proxy: (url, host, cdn) => {
|
||||
return url.replace(host, cdn)
|
||||
},
|
||||
}
|
||||
|
|
Reference in a new issue