From 79feea69dd05f83f340e295835af6ac0dcd6997b Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Feb 2026 21:17:36 +0000 Subject: bot working --- src/utils/player.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/utils/player.js b/src/utils/player.js index e521866..7085dae 100644 --- a/src/utils/player.js +++ b/src/utils/player.js @@ -33,12 +33,19 @@ async function downloadWithYtDlp(song, options = {}) { const ytdlp = spawn('yt-dlp', [ //'--cookies', COOKIES_FILE, + '--js-runtimes', 'node:/home/pajser/.nvm/versions/node/v25.6.0/bin/node', '--format', 'bestaudio[ext=m4a]/bestaudio/best', '--external-downloader', 'aria2c', '--external-downloader-args', '-x16 -s16 -k1M', '--output', '-', song.url, - ]); + ], { + env: { + ...process.env, + NVM_DIR: '/home/pajser/.nvm', + PATH: `/home/pajser/.nvm/versions/node/v25.6.0/bin:` + process.env.PATH + } + }); const chunks = []; let downloadComplete = false; @@ -99,6 +106,7 @@ async function getVideoInfo(query) { const args = [ '--cookies', COOKIES_FILE, + '--js-runtimes', 'node:/home/pajser/.nvm/versions/node/v25.6.0/bin/node', '--dump-json', ]; -- cgit v1.2.3