Small fix, hardcoded each line to set config value to what its supposed to be
This commit is contained in:
parent
9f4d689f2e
commit
c1b5743b14
2 changed files with 13 additions and 9 deletions
|
@ -157,13 +157,7 @@ export class Store {
|
|||
"playlistTrackMapping": true
|
||||
}
|
||||
}
|
||||
private migrations: any = {
|
||||
'1.4.3': (store: ElectronStore) => {
|
||||
if (typeof(store.get('general.discord_rpc')) == 'number') {
|
||||
store.set('general.discord_rpc', this.defaults.general.discord_rpc)
|
||||
}
|
||||
},
|
||||
}
|
||||
private migrations: any = {}
|
||||
|
||||
constructor() {
|
||||
Store.cfg = new ElectronStore({
|
||||
|
@ -175,6 +169,16 @@ export class Store {
|
|||
|
||||
Store.cfg.set(this.mergeStore(this.defaults, Store.cfg.store))
|
||||
this.ipcHandler();
|
||||
|
||||
if (typeof(Store.cfg.get('general.discord_rpc')) != 'object') {
|
||||
Store.cfg.set('general.discord_rpc', this.defaults.general.discord_rpc)
|
||||
Store.cfg.set('general.discord_rpc.enabled', this.defaults.general.discord_rpc.enabled)
|
||||
Store.cfg.set('general.discord_rpc.client', this.defaults.general.discord_rpc.client)
|
||||
Store.cfg.set('general.discord_rpc.clear_on_pause', this.defaults.general.discord_rpc.clear_on_pause)
|
||||
Store.cfg.set('general.discord_rpc.hide_buttons', this.defaults.general.discord_rpc.hide_buttons)
|
||||
Store.cfg.set('general.discord_rpc.state_format', this.defaults.general.discord_rpc.state_format)
|
||||
Store.cfg.set('general.discord_rpc.details_format', this.defaults.general.discord_rpc.details_format)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -221,8 +221,8 @@ export default class DiscordRPC {
|
|||
|
||||
// If the user wants to keep the activity when paused
|
||||
if (!this._utils.getStoreValue("general.discord_rpc.clear_on_pause")) {
|
||||
this._activity.smallImageKey = attributes.status ? 'pause' : 'play';
|
||||
this._activity.smallImageText = attributes.status ? 'Paused' : 'Playing';
|
||||
this._activity.smallImageKey = attributes.status ? 'play' : 'pause';
|
||||
this._activity.smallImageText = attributes.status ? 'Playing' : 'Paused';
|
||||
}
|
||||
|
||||
this.setActivity(this._activity)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue