mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
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:
29
config.js
29
config.js
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user