aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/ytdlp_download.ts2
1 files changed, 1 insertions, 1 deletions
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" }))