mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Push
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
const { logger } = require("../logger");
|
||||
|
||||
function parseVideo(data) {
|
||||
|
||||
// logger.info(`Avant parse: ${JSON.stringify(data, null, 2)}`);
|
||||
|
||||
@@ -15,7 +15,7 @@ if (config.localMode) {
|
||||
denoPath = path.join(__dirname, "../../ressources/deno.exe");
|
||||
} else {
|
||||
userYtDlp = path.join(app.getPath("userData"), "yt-dlp.exe");
|
||||
ffmpegPath = path.join(process.resourcesPath, "ressources"); // <- ici aussi
|
||||
ffmpegPath = path.join(process.resourcesPath, "ffmpeg.exe");
|
||||
denoPath = path.join(process.resourcesPath, "deno.exe");
|
||||
|
||||
if (!fs.existsSync(userYtDlp)) {
|
||||
|
||||
@@ -6,18 +6,19 @@ const config = require("../config");
|
||||
const { execFile } = require("child_process");
|
||||
const { userYtDlp } = require("./helpers/path");
|
||||
|
||||
|
||||
const {ffmpegPath, denoPath} = require("./helpers/path")
|
||||
|
||||
const app = express();
|
||||
|
||||
console.log("ffmpegPath:", ffmpegPath);
|
||||
console.log("denoPath:", denoPath);
|
||||
console.log("Files in ffmpegPath:", fs.readdirSync(ffmpegPath));
|
||||
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
// Dossier de téléchargement
|
||||
const outputFolder = path.join(process.env.USERPROFILE, "Downloads", "Freedom Loader");
|
||||
|
||||
// Création du dossier si nécessaire
|
||||
try {
|
||||
fs.mkdirSync(outputFolder, { recursive: true });
|
||||
@@ -27,7 +28,7 @@ try {
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Mise à jour yt-dlp au démarrage
|
||||
// Mise à jour yt-dlp au
|
||||
execFile(userYtDlp, ["-U"], (err, stdout, stderr) => {
|
||||
if (err) logger.warn("Erreur update yt-dlp:", err);
|
||||
else logger.info(`Update yt-dlp : ${stdout}`);
|
||||
|
||||
Reference in New Issue
Block a user