This commit is contained in:
child_duckling 2022-01-17 19:07:27 -08:00
parent f2cc5bf892
commit e31fd261b3
3 changed files with 84 additions and 40 deletions

View file

@ -0,0 +1,35 @@
import * as electron from "electron";
export default class sendSongToTitlebar {
/**
* Base Plugin Details (Eventually implemented into a GUI in settings)
*/
public name: string = 'sendSongToTitlebar';
public description: string = 'Sets the app\'s titlebar to the Song title';
public version: string = '0.0.1';
public author: string = 'Cider Collective (credit to 8times9 via #147)';
/**
* Runs on plugin load (Currently run on application start)
*/
constructor() {}
/**
* Runs on app ready
*/
onReady(): void {}
/**
* Runs on app stop
*/
onBeforeQuit(): void {}
/**
* Runs on playback State Change
* @param attributes Music Attributes (attributes.state = current state)
*/
onPlaybackStateDidChange(attributes: any): void {
electron.ipcRenderer.send('set-titlebar', attributes.name)
}
/**
* Runs on song change
* @param attributes Music Attributes
*/
onNowPlayingItemDidChange(attributes: object): void {}
}