commit
ea1e4cb2da
2 changed files with 2 additions and 2 deletions
|
@ -102,6 +102,7 @@ export default class DiscordRichPresence {
|
|||
return;
|
||||
}
|
||||
const listenURL = `https://cider.sh/p?s&id=${attributes.playParams.id}` // cider://play/s/[id] (for song)
|
||||
const AMWebURL = `https://music.apple.com/us/song/${attributes.playParams.catalogId}`
|
||||
this._activity = {
|
||||
details: attributes.name,
|
||||
state: `${attributes.artistName ? `by ${attributes.artistName}` : ''}`,
|
||||
|
@ -113,7 +114,7 @@ export default class DiscordRichPresence {
|
|||
|
||||
buttons: [
|
||||
{label: "Listen on Cider", url: listenURL},
|
||||
{label: "Open In Apple Music", url: attributes.songURL},
|
||||
{label: "Open In Apple Music", url: AMWebURL},
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ const MusicKitInterop = {
|
|||
attributes.name = attributes?.name ?? 'No Title Found';
|
||||
attributes.artwork = attributes?.artwork ?? { url: '' };
|
||||
attributes.artwork.url = (attributes?.artwork?.url ?? '').replace(`{f}`,"png");
|
||||
attributes.songUrl = ('https://music.apple.com/song/' + nowPlayingItem?._songId) ?? '';
|
||||
attributes.playParams = attributes?.playParams ?? { id: 'no-id-found' };
|
||||
attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found';
|
||||
if (attributes.playParams.id === 'no-id-found') { attributes.playParams.id = nowPlayingItem?.id ?? 'no-id-found'; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue