Rehauled settings
This commit is contained in:
parent
64610714f1
commit
6943753fd6
1 changed files with 5 additions and 2 deletions
|
@ -22,7 +22,7 @@ class SettingsManager {
|
|||
settings = await this.#makeNewSettingsFile()
|
||||
}
|
||||
this.settings = JSON.parse(settings.toString())
|
||||
this.currentSetting = this.settings.presets[this.settings.currentSetting]
|
||||
this.currentSetting = this.settings.size_limit
|
||||
}
|
||||
async #getSettings() {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -34,6 +34,9 @@ class SettingsManager {
|
|||
}
|
||||
async #makeNewSettingsFile() {
|
||||
const settings = `
|
||||
"size_limit": 64000
|
||||
`
|
||||
/*const settings = `
|
||||
{
|
||||
"currentSetting": 2,
|
||||
"presets": [{
|
||||
|
@ -63,7 +66,7 @@ class SettingsManager {
|
|||
"bitrateError": 70
|
||||
}]
|
||||
}
|
||||
`
|
||||
`*/
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.writeFile(path.resolve(this.settingsFile, "settings.json"), settings, (err) => {
|
||||
if (err) return
|
||||
|
|
Loading…
Reference in a new issue