made eq backend pass JSON objects instead of strings

This commit is contained in:
Swiftzerr 2022-01-31 21:40:15 -05:00
parent 1a217e6358
commit 427afb9205

View file

@ -401,11 +401,10 @@
exportPreset() {
const preset = app.cfg.audio.equalizer.presets.find(p => p.preset == app.cfg.audio.equalizer.preset)
const jsonObj = {"name": preset.name, "author": app.chrome.userinfo.attributes.name, "frequency": preset.frequencies, "gain": preset.gain, "q": preset.Q, "preamp": preset.preamp, "mix": preset.mix, "vibrantBass": preset.vibrantBass};
ipcRenderer.send("export-eq", JSON.stringify(jsonObj))
ipcRenderer.send("export-eq", jsonObj)
},
importPreset() {
ipcRenderer.sendSync("import-eq").then((result) => {
JSON.parse(result)
let newPreset = new self.eqPreset()
newPreset.name = result.name
newPreset.author = result.author