fix: xml naming
This commit is contained in:
parent
5abdeb193e
commit
a4df253608
1 changed files with 2 additions and 1 deletions
|
@ -7,7 +7,8 @@ module.exports = async function () {
|
|||
const date = parseInt(chart['weeklyartistchart']['@attr']['to']) * 1000
|
||||
let content = 'My top artists for the week: '
|
||||
artists.forEach((artist, index) => {
|
||||
content += `${encodeURIComponent(artist['name'])} @ ${artist['playcount']} play${
|
||||
const artistName = artist['name'].replace('&', '&');
|
||||
content += `${artistName} @ ${artist['playcount']} play${
|
||||
parseInt(artist['playcount']) > 1 ? 's' : ''
|
||||
}`
|
||||
if (index !== artists.length - 1) content += ', '
|
||||
|
|
Reference in a new issue