Update discordrpc.ts (Core's solution)

This commit is contained in:
yazninja 2022-01-28 11:03:54 +08:00
parent 499dc6af15
commit f767fc72a9

View file

@ -102,7 +102,6 @@ export default class DiscordRichPresence {
return; return;
} }
const listenURL = `https://cider.sh/p?s&id=${attributes.playParams.id}` // cider://play/s/[id] (for song) const listenURL = `https://cider.sh/p?s&id=${attributes.playParams.id}` // cider://play/s/[id] (for song)
this._activity = { this._activity = {
details: attributes.name, details: attributes.name,
state: `${attributes.artistName ? `by ${attributes.artistName}` : ''}`, state: `${attributes.artistName ? `by ${attributes.artistName}` : ''}`,
@ -114,7 +113,7 @@ export default class DiscordRichPresence {
buttons: [ buttons: [
{label: "Listen on Cider", url: listenURL}, {label: "Listen on Cider", url: listenURL},
{label: "Open In Apple Music", url: data.attributes.url}, {label: "Open In Apple Music", url: attributes.songURL},
] ]
}; };