fix plugins

This commit is contained in:
vapormusic 2022-01-26 15:19:24 +07:00
parent ebef384726
commit 1f65d2ed17
3 changed files with 3 additions and 9 deletions

View file

@ -35,12 +35,6 @@ electron.app.on('ready', () => {
App.bwCreated(win);
/// please dont change this for plugins to get proper and fully initialized Win objects
plug.callPlugins('onReady', win);
const reactDevToolsPath = "E:/Cider/build/audion"
await electron.session.defaultSession.loadExtension(reactDevToolsPath).then(() => {
console.log('reads')
})
win.on("ready-to-show", () => {
win.show();
});

View file

@ -27,7 +27,7 @@ export default class sendSongToTitlebar {
* @param attributes Music Attributes (attributes.state = current state)
*/
onPlaybackStateDidChange(attributes: any): void {
this._win.win.setTitle(`${(attributes != null && attributes.name != null && attributes.name.length > 0) ? (attributes.name + " - ") : ''}Cider`)
this._win.setTitle(`${(attributes != null && attributes.name != null && attributes.name.length > 0) ? (attributes.name + " - ") : ''}Cider`)
}
/**
* Runs on song change

View file

@ -191,7 +191,7 @@ export default class LastFMPlugin {
this._store.lastfm.enabled = true;
this._store.lastfm.auth_token = authKey;
console.log(authKey);
this._win.win.webContents.send('LastfmAuthenticated', authKey);
this._win.webContents.send('LastfmAuthenticated', authKey);
this.authenticate();
}
}
@ -206,7 +206,7 @@ export default class LastFMPlugin {
const authKey = authURI.split('lastfm?token=')[1];
this._store.lastfm.enabled = true;
this._store.lastfm.auth_token = authKey;
this._win.win.webContents.send('LastfmAuthenticated', authKey);
this._win.webContents.send('LastfmAuthenticated', authKey);
console.log(authKey);
this.authenticate();
}