feat: search rym if no mbid

This commit is contained in:
Cory Dransfeldt 2023-07-30 14:50:31 -07:00
parent 3c4314be12
commit e5efabeec4
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -23,7 +23,9 @@ module.exports = async function () {
: `https://cdn.coryd.dev/albums/${album['name'].name
.replace(/\s+/g, '-')
.toLowerCase()}.jpg`,
url: `https://musicbrainz.org/album/${album['mbid']}`,
url: album['mbid']
? `https://musicbrainz.org/album/${album['mbid']}`
: `https://rateyourmusic.com/search?searchtype=l&searchterm=${encodeURI(album['name'])}`,
}
})
}