diff --git a/config.js b/config.js index 730dd0b..928349d 100644 --- a/config.js +++ b/config.js @@ -5,7 +5,7 @@ const path = require("path"); 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 = {}; diff --git a/main.js b/main.js index abe30e4..272a9c5 100644 --- a/main.js +++ b/main.js @@ -13,10 +13,10 @@ let mainWindow; const logsFolderPath = logDir; const basePath = config.localMode - ? path.join(__dirname, "config") + ? path.join(__dirname ) : 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"); diff --git a/package.json b/package.json index 5c430a8..f2084d2 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ }, { "from": "config/config.json", - "to": "config.json" + "to": "config/config.json" } ], "win": { diff --git a/server/helpers/path.js b/server/helpers/path.js index bf35f94..8eac1a5 100644 --- a/server/helpers/path.js +++ b/server/helpers/path.js @@ -9,14 +9,14 @@ let userYtDlp; let ffmpegPath; let denoPath; -const sourceYtDlp = path.join(process.resourcesPath, "yt-dlp.exe"); +const sourceYtDlp = path.join(process.resourcesPath, "binaries","yt-dlp.exe"); if (config.localMode) { userYtDlp = path.join(__dirname, "../../ressources/yt-dlp.exe"); ffmpegPath = path.join(__dirname, "../../ressources/"); // <- contient ffmpeg.exe et ffprobe.exe denoPath = path.join(__dirname, "../../ressources/deno.exe"); } 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"); denoPath = path.join(process.resourcesPath, "binaries","deno.exe");