Browse Source

Made settings more readable

pull/1/head
RemixDev 4 months ago
parent
commit
b855d8d3a0
3 changed files with 4 additions and 4 deletions
  1. +0
    -0
      deemix/plugins/index.js
  2. +3
    -3
      deemix/plugins/spotify.js
  3. +1
    -1
      deemix/settings.js

deemix/plugins/plugin.js → deemix/plugins/index.js View File


+ 3
- 3
deemix/plugins/spotify.js View File

@ -1,4 +1,4 @@
const Plugin = require('./plugin.js')
const Plugin = require('./index.js')
const { getConfigFolder } = require('../utils/localpaths.js')
const {
generateTrackItem,
@ -353,7 +353,7 @@ class Spotify extends Plugin {
fs.writeFileSync(this.configFolder+'settings.json', JSON.stringify({
...this.credentials,
...this.settings
}))
}, null, 2))
let settings = JSON.parse(fs.readFileSync(this.configFolder+'settings.json'))
this.setSettings(settings)
this.checkCredentials()
@ -365,7 +365,7 @@ class Spotify extends Plugin {
fs.writeFileSync(this.configFolder+'settings.json', JSON.stringify({
...this.credentials,
...this.settings
}))
}, null, 2))
}
getSettings(){


+ 1
- 1
deemix/settings.js View File

@ -104,7 +104,7 @@ function save(settings, configFolder){
configFolder = configFolder || getConfigFolder()
if (!fs.existsSync(configFolder)) fs.mkdirSync(configFolder)
fs.writeFileSync(configFolder+'config.json', JSON.stringify(settings))
fs.writeFileSync(configFolder+'config.json', JSON.stringify(settings, null, 2))
}
function load(configFolder){


Loading…
Cancel
Save