From 1f65d2ed17847257ff18eab2ad7ee7b6b5a17899 Mon Sep 17 00:00:00 2001 From: vapormusic Date: Wed, 26 Jan 2022 15:19:24 +0700 Subject: [PATCH] fix plugins --- src/main/index.ts | 6 ------ src/main/plugins/Extras/sendSongToTitlebar.ts | 2 +- src/main/plugins/lastfm.ts | 4 ++-- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index fff2b36f..6862aa18 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -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(); }); diff --git a/src/main/plugins/Extras/sendSongToTitlebar.ts b/src/main/plugins/Extras/sendSongToTitlebar.ts index 540e32f4..8b39e47d 100644 --- a/src/main/plugins/Extras/sendSongToTitlebar.ts +++ b/src/main/plugins/Extras/sendSongToTitlebar.ts @@ -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 diff --git a/src/main/plugins/lastfm.ts b/src/main/plugins/lastfm.ts index d586b857..465ec606 100644 --- a/src/main/plugins/lastfm.ts +++ b/src/main/plugins/lastfm.ts @@ -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(); }