From 4e397f4c096b59d0d8c597aa279e0f0448a174c3 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 25 Apr 2025 19:58:46 +0300 Subject: Improve yt-dlp invocation --- src/index.ts | 5 +++++ src/tasks.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d489dc3..0615cd7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -75,6 +75,11 @@ app.command("/veeti", async ({ command, ack, respond, client }) => { }); }; + void respond({ + text: "Veeti link added to task queue. Wait a moment...", + response_type: "ephemeral", + }); + addTask({ type: "download_url", url, diff --git a/src/tasks.ts b/src/tasks.ts index 0b220bb..c25fd80 100644 --- a/src/tasks.ts +++ b/src/tasks.ts @@ -24,7 +24,7 @@ export const runDownloadUrlTask = async (task: Task) => { } const { stdout } = await asyncExec( - `yt-dlp --cookies-from-browser chromium -o "${filepath}" "${task.url}"`, + `yt-dlp -f mp4 --restrict-filenames -o "${filename}" -P downloads --cookies-from-browser chromium "${task.url}"`, ); console.log(stdout); task.respondWithFile(filename); -- cgit v1.3