yh
This commit is contained in:
parent
f9becc61ae
commit
c8c437449e
5 changed files with 78 additions and 17 deletions
|
@ -162,13 +162,13 @@ export class AppEvents {
|
|||
|
||||
// LastFM Auth URL
|
||||
if (arg.includes('auth')) {
|
||||
let authURI = arg.split('/auth/')[1]
|
||||
const authURI = arg.split('/auth/')[1]
|
||||
if (authURI.startsWith('lastfm')) { // If we wanted more auth options
|
||||
const authKey = authURI.split('lastfm?token=')[1];
|
||||
utils.setStoreValue('lastfm.enabled', true);
|
||||
utils.setStoreValue('lastfm.auth_token', authKey);
|
||||
utils.getWindow().webContents.send('LastfmAuthenticated', authKey);
|
||||
this.plugin.callPlugin('lastfm', 'authenticate', authKey);
|
||||
// const authKey = authURI.split('lastfm?token=')[1];
|
||||
// utils.setStoreValue('lastfm.enabled', true);
|
||||
// utils.setStoreValue('lastfm.auth_token', authKey);
|
||||
// utils.getWindow().webContents.send('LastfmAuthenticated', authKey);
|
||||
this.plugin.callPlugin('lastfm', 'authenticateUser', authURI.split('lastfm?token=')[1]);
|
||||
}
|
||||
}
|
||||
// Play
|
||||
|
|
|
@ -222,10 +222,14 @@ export class Store {
|
|||
"lastfm": {
|
||||
"enabled": false,
|
||||
"scrobble_after": 30,
|
||||
"auth_token": "",
|
||||
"enabledRemoveFeaturingArtists": true,
|
||||
"filterLoop": true,
|
||||
"NowPlaying": "true"
|
||||
"NowPlaying": "true",
|
||||
"secrets": {
|
||||
"auth_token": "",
|
||||
"session": {},
|
||||
}
|
||||
|
||||
},
|
||||
"advanced": {
|
||||
"AudioContext": false,
|
||||
|
|
|
@ -43,6 +43,13 @@ export class utils {
|
|||
return app;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the IPCMain
|
||||
*/
|
||||
static getIPCMain(): Electron.IpcMain {
|
||||
return ipcMain
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches the i18n locale for the given language.
|
||||
* @param language {string} The language to fetch the locale for.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue