Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

chore: log download command

Christian Feif80ef4647ba9
diff --git a/lib/youtube.js b/lib/youtube.js
index 9e2d83b..8db1f94 100644
--- a/lib/youtube.js
+++ b/lib/youtube.js
@@ -25,7 +25,9 @@ export async function downloadVideo(id, repo, callback = () => {}) {
try {
const cookiesPath = getOptionalCookiesPath()
let cookiesOption = cookiesPath ? `--cookies ${cookiesPath}` : ''
- for await (const line of spawn('yt-dlp', `-o ./data/videos/${id}.mp4 ${cookiesOption} ${videoYTDLPArgs} ${subtitlesYTDLPArgs} -- ${id}`.split(/ +/))) {
+ const commandArgs = `-o ./data/videos/${id}.mp4 ${cookiesOption} ${videoYTDLPArgs} ${subtitlesYTDLPArgs} -- ${id}`.split(/ +/)
+ console.log('running yt-dlp', commandArgs.join(' '))
+ for await (const line of spawn('yt-dlp', commandArgs)) {
console.log(line)
callback(line)
}