link handling for discordrpc.ts
This commit is contained in:
parent
807b75cfd3
commit
a5e22d5f0d
2 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ export default class DiscordRichPresence {
|
||||||
buttons: [
|
buttons: [
|
||||||
{label: "Listen on Cider", url: attributes.url.cider},
|
{label: "Listen on Cider", url: attributes.url.cider},
|
||||||
{label: "View on Apple Music", url: attributes.url.appleMusic},
|
{label: "View on Apple Music", url: attributes.url.appleMusic},
|
||||||
]
|
] //To change attributes.url => preload/cider-preload.js
|
||||||
};
|
};
|
||||||
|
|
||||||
this._activity = this.filterActivity(this._activity, attributes)
|
this._activity = this.filterActivity(this._activity, attributes)
|
||||||
|
|
|
@ -82,7 +82,7 @@ const MusicKitInterop = {
|
||||||
attributes.playParams = attributes?.playParams ?? {id: 'no-id-found'};
|
attributes.playParams = attributes?.playParams ?? {id: 'no-id-found'};
|
||||||
attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found';
|
attributes.playParams.id = attributes?.playParams?.id ?? 'no-id-found';
|
||||||
attributes.url = {
|
attributes.url = {
|
||||||
cider: `cider://play/s/${nowPlayingItem?._songId ?? (nowPlayingItem?.songId ??'no-id-found')}`,
|
cider: `https://cider.sh/link?play/s/${nowPlayingItem?._songId ?? (nowPlayingItem?.songId ??'no-id-found')}`,
|
||||||
appleMusic: attributes.websiteUrl ? attributes.websiteUrl : `https://music.apple.com/${mk.storefrontId}/song/${nowPlayingItem?._songId ?? (nowPlayingItem?.songId ??'no-id-found')}`
|
appleMusic: attributes.websiteUrl ? attributes.websiteUrl : `https://music.apple.com/${mk.storefrontId}/song/${nowPlayingItem?._songId ?? (nowPlayingItem?.songId ??'no-id-found')}`
|
||||||
}
|
}
|
||||||
if (attributes.playParams.id === 'no-id-found') {
|
if (attributes.playParams.id === 'no-id-found') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue