mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
YTDLP Path DevMode
This commit is contained in:
@@ -2,5 +2,6 @@ module.exports = {
|
|||||||
version: "1.3.0",
|
version: "1.3.0",
|
||||||
applicationPort: "8787",
|
applicationPort: "8787",
|
||||||
debugMode: true,
|
debugMode: true,
|
||||||
|
localMode: true,
|
||||||
DiscordRPCID: "1410934537051181146",
|
DiscordRPCID: "1410934537051181146",
|
||||||
}
|
}
|
||||||
Binary file not shown.
@@ -1,13 +1,18 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const { app } = require("electron");
|
const { app } = require("electron");
|
||||||
|
const config = require("../../config");
|
||||||
|
|
||||||
const userYtDlp = path.join(app.getPath("userData"), "yt-dlp.exe");
|
let userYtDlp;
|
||||||
const sourceYtDlp = path.join(process.resourcesPath, "yt-dlp.exe");
|
const sourceYtDlp = path.join(process.resourcesPath, "yt-dlp.exe");
|
||||||
|
|
||||||
if (!fs.existsSync(userYtDlp)) fs.copyFileSync(sourceYtDlp, userYtDlp);
|
if (config.localMode === true) {
|
||||||
|
|
||||||
module.exports = {
|
userYtDlp = path.join(__dirname, "../../ressources/yt-dlp.exe");
|
||||||
userYtDlp,
|
} else {
|
||||||
sourceYtDlp
|
|
||||||
};
|
userYtDlp = path.join(app.getPath("userData"), "yt-dlp.exe");
|
||||||
|
if (!fs.existsSync(userYtDlp)) fs.copyFileSync(sourceYtDlp, userYtDlp);
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { userYtDlp, sourceYtDlp };
|
||||||
|
|||||||
Reference in New Issue
Block a user