Feat: Implement Config File. Read by Front and Back. It aims to give possibility to disable some features quickly. Currenty: DiscordRPC, AutoCheckInfo, AutoUpdate, Custom TopBar, AddMetadata, Add Thumbail were put and implement. Other need to be implement. That's the begin of Settings Panel

This commit is contained in:
MasterAcnolo
2026-01-14 14:03:32 +01:00
parent 42ae0e7204
commit 31d8b20a76
8 changed files with 193 additions and 152 deletions

View File

@@ -1,5 +1,20 @@
const packageJson = require("./package.json");
const { app } = require("electron");
const fs = require("fs");
const path = require("path");
const featuresPath = path.join(__dirname, "./config/config.json");
let features = {};
function loadFeatures() {
const raw = fs.readFileSync(featuresPath, "utf-8");
features = JSON.parse(raw);
console.log(features)
return features;
}
const configFeatures = loadFeatures();
module.exports = {
version: packageJson.version,
@@ -7,17 +22,5 @@ module.exports = {
debugMode: true,
localMode: !app.isPackaged,
DiscordRPCID: "1410934537051181146",
// Variables Used to toggle main features
autoUpdate: true,
discordRPC: true,
customTopBar: true, // (Will be active on next launch)
autoDownloadPlaylist: true,
logSystem: true, // Disable = Dangerous
autoCheckInfo: true, // To Improve speed ? (NO)
outputTitleCheck: true, // For Non latin characters (Russian)
addThumbail: true, // The Pictures in the files (audio files)
addMetadata: true, // Looks Explicit
downloadSystem: true, // Why would you disable this ? I don't know but why not
notifySystem: true // Notification when download
configFeatures
}