Fix: Put config.json file into config folder for better readability + Fix Yt-DLP Path

This commit is contained in:
MasterAcnolo
2026-01-15 22:01:26 +01:00
parent b7a193b062
commit 2f105f5145
4 changed files with 6 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ const path = require("path");
const localMode = !app.isPackaged; const localMode = !app.isPackaged;
const featuresPath = localMode ? path.join(__dirname, "./config/config.json") : path.join(path.join(process.resourcesPath, "config.json")); const featuresPath = localMode ? path.join(__dirname, "./config/config.json") : path.join(path.join(process.resourcesPath,"config/" ,"config.json"));
let features = {}; let features = {};

View File

@@ -13,10 +13,10 @@ let mainWindow;
const logsFolderPath = logDir; const logsFolderPath = logDir;
const basePath = config.localMode const basePath = config.localMode
? path.join(__dirname, "config") ? path.join(__dirname )
: path.join(path.dirname(process.execPath), "resources"); : path.join(path.dirname(process.execPath), "resources");
const configFolderPath = path.join(basePath, "config.json"); const configFolderPath = path.join(basePath, "config" ,"config.json");
const defaultDownloadPath = path.join(os.homedir(), "Downloads", "Freedom Loader"); const defaultDownloadPath = path.join(os.homedir(), "Downloads", "Freedom Loader");

View File

@@ -80,7 +80,7 @@
}, },
{ {
"from": "config/config.json", "from": "config/config.json",
"to": "config.json" "to": "config/config.json"
} }
], ],
"win": { "win": {

View File

@@ -9,14 +9,14 @@ let userYtDlp;
let ffmpegPath; let ffmpegPath;
let denoPath; let denoPath;
const sourceYtDlp = path.join(process.resourcesPath, "yt-dlp.exe"); const sourceYtDlp = path.join(process.resourcesPath, "binaries","yt-dlp.exe");
if (config.localMode) { if (config.localMode) {
userYtDlp = path.join(__dirname, "../../ressources/yt-dlp.exe"); userYtDlp = path.join(__dirname, "../../ressources/yt-dlp.exe");
ffmpegPath = path.join(__dirname, "../../ressources/"); // <- contient ffmpeg.exe et ffprobe.exe ffmpegPath = path.join(__dirname, "../../ressources/"); // <- contient ffmpeg.exe et ffprobe.exe
denoPath = path.join(__dirname, "../../ressources/deno.exe"); denoPath = path.join(__dirname, "../../ressources/deno.exe");
} else { } else {
userYtDlp = path.join(app.getPath("userData"),"binaries","yt-dlp.exe"); userYtDlp = path.join(app.getPath("userData"),"yt-dlp.exe");
ffmpegPath = path.join(process.resourcesPath, "binaries","ffmpeg.exe"); ffmpegPath = path.join(process.resourcesPath, "binaries","ffmpeg.exe");
denoPath = path.join(process.resourcesPath, "binaries","deno.exe"); denoPath = path.join(process.resourcesPath, "binaries","deno.exe");