From 102bbf10a470a8617902cd5bf255be5762f335b9 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 19 May 2025 22:04:13 +0200 Subject: dont crash on failed download --- scripts/ytdlp_download.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ytdlp_download.ts b/scripts/ytdlp_download.ts index b98e921..d31280f 100644 --- a/scripts/ytdlp_download.ts +++ b/scripts/ytdlp_download.ts @@ -67,7 +67,7 @@ async function do_download(key: string, data: { [key: string]: string }) { })) } const status = await child.status - if (!status.success) throw new Error("download failed"); + if (!status.success) ws.send(JSON.stringify({ t: "metadata", key, data: { failed: true } })) ws.send(JSON.stringify({ t: "metadata", key, data: { progress: null, status: null } })) ws.send(JSON.stringify({ t: "complete", key })) ws.send(JSON.stringify({ t: "save" })) -- cgit v1.2.3-70-g09d2