From 86e666479530137de191f251c21e22c8e7c4082e Mon Sep 17 00:00:00 2001 From: A Bunch of Computer Nerds Date: Thu, 12 Dec 2024 22:08:47 -0300 Subject: [PATCH] Simple fixes on youtube.js --- src/commands/youtube.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/youtube.js b/src/commands/youtube.js index f35cf73..fe183e7 100644 --- a/src/commands/youtube.js +++ b/src/commands/youtube.js @@ -61,18 +61,18 @@ module.exports = (bot) => { const ytDlpPath = getYtDlpPath(); const userId = ctx.from.id; const videoUrl = ctx.message.text.split(' ').slice(1).join(' '); - let cookieFlag = ""; - const mp4File = `tmp/${userId}.mp4`; const tempMp4File = `tmp/${userId}.f137.mp4`; const tempWebmFile = `tmp/${userId}.f251.webm`; - let cmdArgs = `--max-filesize 2G --no-playlist --merge-output-format mp4 -o`; + let cmdArgs = ""; const dlpCommand = ytDlpPath; const ffmpegPath = getFfmpegPath(); const ffmpegArgs = ['-i', tempMp4File, '-i', tempWebmFile, '-c:v copy -c:a copy -strict -2', mp4File]; if (fs.existsSync(path.resolve(__dirname, "../props/cookies.txt"))) { cmdArgs = "--max-filesize 2G --no-playlist --cookies src/props/cookies.txt --merge-output-format mp4 -o"; + } else { + cmdArgs = `--max-filesize 2G --no-playlist --merge-output-format mp4 -o`; } try {