summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-04-25 19:58:46 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-04-25 19:58:46 +0300
commit4e397f4c096b59d0d8c597aa279e0f0448a174c3 (patch)
tree0df346d990c14f8195d177f1bad0a860aa20e745
parentd77026c271b3d81ed29c0435c1cb24850389fe67 (diff)
Improve yt-dlp invocation
-rw-r--r--src/index.ts5
-rw-r--r--src/tasks.ts2
2 files changed, 6 insertions, 1 deletions
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);