Dynamic Code Woah!
This commit is contained in:
parent
5eec89eb72
commit
c6a3555d50
1 changed files with 2 additions and 9 deletions
|
@ -102,15 +102,8 @@ export default class DiscordRichPresence {
|
|||
return;
|
||||
}
|
||||
const listenURL = `https://cider.sh/p?s&id=${attributes.playParams.id}` // cider://play/s/[id] (for song)
|
||||
let AMWebURL = '';
|
||||
if(attributes.playParams.catalogId == null){
|
||||
AMWebURL = `https://music.apple.com/${attributes.storefrontId}/song/${attributes.playParams.id}`
|
||||
console.log("No Catalog ID");
|
||||
}
|
||||
else {
|
||||
AMWebURL = `https://music.apple.com/${attributes.storefrontId}/song/${attributes.playParams.catalogId}`
|
||||
}
|
||||
console.log("DiscordRPC URL: ", AMWebURL);
|
||||
let AMWebURL = `https://music.apple.com/${attributes.storefrontId}/song/${attributes.playParams.catalogId || attributes.playParams.id}`
|
||||
console.log("AMWeb URL: ", AMWebURL);
|
||||
this._activity = {
|
||||
details: attributes.name,
|
||||
state: `${attributes.artistName ? `by ${attributes.artistName}` : ''}`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue