Skip to content

Commit

Permalink
Revert config generation changes, still need to check for missing pro…
Browse files Browse the repository at this point in the history
…perties
  • Loading branch information
MasterIO02 committed Nov 4, 2021
1 parent 78adf47 commit c09aa85
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (!fs.existsSync(process.cwd() + "/config.json")) {
let config = require(process.cwd() + "/config.json")
const { startServer } = require("./files/server")

if (Object.entries(config).length === 0) {
if (Object.entries(config).length <= 4) {
const defaultConfig = {
debugLogs: false,
customServer: {
Expand All @@ -30,6 +30,52 @@ if (Object.entries(config).length === 0) {
writeConfig()
}

if (typeof config.usingOsuApi === "undefined") {
config.usingOsuApi = false
config.osuApiKey = ""
writeConfig()
}
if (typeof config.motionBlurCapable === "undefined") {
config.motionBlurCapable = false
writeConfig()
}
if (typeof config.debugLogs === "undefined") {
config.debugLogs = false
writeConfig()
}
if (typeof config.customServer === "undefined") {
config.customServer = {
clientUrl: "",
apiUrl: ""
}
}

if (typeof config.needUpdate === "undefined") {
config.needUpdate = false
writeConfig()
}
if (typeof config.deleteRenderedVideos === "undefined") {
config.deleteRenderedVideos = false
writeConfig()
}
if (typeof config.showFullDanserLogs === "undefined") {
config.showFullDanserLogs = false
writeConfig()
}
if (typeof config.showFullFFmpegLogs === "undefined") {
config.showFullFFmpegLogs = false
writeConfig()
}
if (typeof config.renderOnInactivityOnly === "undefined") {
config.renderOnInactivityOnly = false
writeConfig()
}

if (typeof config.relay === "undefined") {
config.relay = "direct"
writeConfig()
}

if (typeof config.uhdCapable === "undefined") {
config.uhdCapable = false
writeConfig()
Expand Down

0 comments on commit c09aa85

Please sign in to comment.