Manual token submission functionality

This commit is contained in:
Core 2022-06-28 13:39:09 +01:00
parent e032302b5d
commit f58ca1c613
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6
4 changed files with 14 additions and 5 deletions

View file

@ -38,7 +38,7 @@ export default class lastfm {
// Register the ipcMain handlers
this._utils.getIPCMain().handle('lastfm:url', (event: any) => {
console.debug(`${lastfm.name}:url`, event)
console.debug(`${lastfm.name}:url`)
return this._lfm.getAuthenticationUrl({"cb": "cider://auth/lastfm"})
})
@ -114,6 +114,8 @@ export default class lastfm {
this._lfm.authenticate(token, (err: any, session: any) => {
if (err) {
console.error(err);
this._utils.getWindow().webContents.executeJavaScript(`app.notyf.error("${err.message}");`)
return;
}
this._utils.getWindow().webContents.send('lastfm:authenticated', session)