added toggle for song.link button in discord rpc (#1435)
* Add song.link * added toggle for song.link button for discord rpc Co-authored-by: Charles Surett <surettcharles@gmail.com>
This commit is contained in:
parent
57edd48b1f
commit
9cb864b971
4 changed files with 17 additions and 1 deletions
|
@ -233,11 +233,13 @@ export default class DiscordRPC {
|
|||
*/
|
||||
private filterActivity(activity: any, attributes: any): Object {
|
||||
// Add the buttons if people want them
|
||||
const showSongLink = this._utils.getStoreValue("connectivity.discord_rpc.show_songlink");
|
||||
if (!this._utils.getStoreValue("connectivity.discord_rpc.hide_buttons")) {
|
||||
activity.buttons = [
|
||||
{ label: "Listen on Cider", url: attributes.url.cider },
|
||||
{ label: "View on Apple Music", url: attributes.url.appleMusic },
|
||||
]; //To change attributes.url => preload/cider-preload.js
|
||||
... showSongLink ? [{label: "Song.link", url: 'https://song.link/i/' + attributes.songId}] : []
|
||||
]; //To change attributes.url => preload/cider-preload.js
|
||||
}
|
||||
|
||||
// Add the timestamp if its playing and people want them
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue