feat: dry up + normalize now page
This commit is contained in:
parent
022ce82f81
commit
6dda493d7b
13 changed files with 86 additions and 136 deletions
|
@ -11,7 +11,7 @@ module.exports = async function () {
|
|||
const data = await res
|
||||
return data['topalbums'].album.map((album) => {
|
||||
return {
|
||||
name: album['name'],
|
||||
title: album['name'],
|
||||
artist: album['artist']['name'],
|
||||
plays: album['playcount'],
|
||||
rank: album['@attr']['rank'],
|
||||
|
@ -26,6 +26,7 @@ module.exports = async function () {
|
|||
url: album['mbid']
|
||||
? `https://musicbrainz.org/album/${album['mbid']}`
|
||||
: `https://musicbrainz.org/search?query=${encodeURI(album['name'])}&type=release_group`,
|
||||
type: 'album',
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Reference in a new issue