From d8d0978bccd6bac4e6930f56c7cf2fa9cf5364ec Mon Sep 17 00:00:00 2001 From: metamuffin Date: Fri, 23 May 2025 14:37:32 +0200 Subject: make info task insert optional --- scripts/ytdlp_flatten.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/ytdlp_flatten.ts') diff --git a/scripts/ytdlp_flatten.ts b/scripts/ytdlp_flatten.ts index 5145196..499233d 100644 --- a/scripts/ytdlp_flatten.ts +++ b/scripts/ytdlp_flatten.ts @@ -74,8 +74,10 @@ ws.onmessage = async ev => { if (p.t == "work") { const [outkind, url] = key_to_url(p.key) await flat_playlist(url, outkind, p.data) - ws.send(JSON.stringify({ t: "metadata", key: key_to_infokey(p.key), data: p.data })) - ws.send(JSON.stringify({ t: "enqueue", key: key_to_infokey(p.key) })) + if (config.ytdlp_flatten.enqueue_info) { + ws.send(JSON.stringify({ t: "metadata", key: key_to_infokey(p.key), data: p.data })) + ws.send(JSON.stringify({ t: "enqueue", key: key_to_infokey(p.key) })) + } ws.send(JSON.stringify({ t: "complete", key: p.key })) ws.send(JSON.stringify({ t: "save" })) ws.send(JSON.stringify({ t: "accept" })) -- cgit v1.2.3-70-g09d2