discord rpc plugin

This commit is contained in:
vapormusic 2022-01-19 13:03:37 +07:00
parent 71e45aff3f
commit 2d27939881
4 changed files with 211 additions and 7 deletions

View file

@ -1,5 +1,3 @@
import * as electron from "electron";
export default class sendSongToTitlebar {
/**
* Base Plugin Details (Eventually implemented into a GUI in settings)
@ -29,7 +27,7 @@ export default class sendSongToTitlebar {
* @param attributes Music Attributes (attributes.state = current state)
*/
onPlaybackStateDidChange(attributes: any): void {
this._win.setTitle(`${(attributes != null && attributes.name != null && attributes.name.length > 0) ? (attributes.name + " - ") : ''}Cider`)
this._win.win.setTitle(`${(attributes != null && attributes.name != null && attributes.name.length > 0) ? (attributes.name + " - ") : ''}Cider`)
}
/**
* Runs on song change