diff options
author | metamuffin <metamuffin@disroot.org> | 2025-05-19 22:04:13 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2025-05-19 22:04:13 +0200 |
commit | 102bbf10a470a8617902cd5bf255be5762f335b9 (patch) | |
tree | fdfc494b9efcfcb9f633aa4167b1761645903d27 /scripts/ytdlp_download.ts | |
parent | 40deb623d7948d56d8d4a4b8ebff983278ca6de8 (diff) | |
download | isda-102bbf10a470a8617902cd5bf255be5762f335b9.tar isda-102bbf10a470a8617902cd5bf255be5762f335b9.tar.bz2 isda-102bbf10a470a8617902cd5bf255be5762f335b9.tar.zst |
dont crash on failed download
Diffstat (limited to 'scripts/ytdlp_download.ts')
-rw-r--r-- | scripts/ytdlp_download.ts | 2 |
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" })) |