also no more session.json

This commit is contained in:
Core 2022-06-15 20:28:18 +01:00
parent d4c8d9001a
commit 5c955820dd
No known key found for this signature in database
GPG key ID: FE9BF1B547F8F3C6

View file

@ -93,7 +93,7 @@ export default class lastfm {
}); });
if (this._utils.getStoreValue("lastfm.secrets.username") && this._utils.getStoreValue("lastfm.secrets.key")) { if (this._utils.getStoreValue("lastfm.secrets.username") && this._utils.getStoreValue("lastfm.secrets.key")) {
this._lfm.setSessionCredentials(this._utils.getStoreValue("lastfm.secrets.session.username"), this._utils.getStoreValue("lastfm.secrets.session.key")); this._lfm.setSessionCredentials(this._utils.getStoreValue("lastfm.secrets.username"), this._utils.getStoreValue("lastfm.secrets.key"));
this._authenticated = true; this._authenticated = true;
} else { } else {
this.authenticateLastFM(token) this.authenticateLastFM(token)
@ -112,7 +112,6 @@ export default class lastfm {
console.error(err); console.error(err);
return; return;
} }
console.log(session); // {"name": "LASTFM_USERNAME", "key": "THE_USER_SESSION_KEY"}
this._utils.setStoreValue("lastfm.secrets.token", token) this._utils.setStoreValue("lastfm.secrets.token", token)
this._utils.setStoreValue('lastfm.secrets.username', session.username); this._utils.setStoreValue('lastfm.secrets.username', session.username);
this._utils.setStoreValue('lastfm.secrets.key', session.key); this._utils.setStoreValue('lastfm.secrets.key', session.key);