aboutsummaryrefslogtreecommitdiff
path: root/scripts/ytdlp_channel_info.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-05-21 22:31:12 +0200
committermetamuffin <metamuffin@disroot.org>2025-05-21 22:31:12 +0200
commit31afd20b68a00a1cf0564b7941cb5cc1f73ba1bf (patch)
treee34387a305e99f617acfef44a032bfc65f7d5e7d /scripts/ytdlp_channel_info.ts
parent89f067e0ed2a900c32d95beae668c0321d7da79f (diff)
downloadisda-31afd20b68a00a1cf0564b7941cb5cc1f73ba1bf.tar
isda-31afd20b68a00a1cf0564b7941cb5cc1f73ba1bf.tar.bz2
isda-31afd20b68a00a1cf0564b7941cb5cc1f73ba1bf.tar.zst
fix unbuffered writing in channel info by downloading to memory first
Diffstat (limited to 'scripts/ytdlp_channel_info.ts')
-rw-r--r--scripts/ytdlp_channel_info.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/ytdlp_channel_info.ts b/scripts/ytdlp_channel_info.ts
index 803336c..b953e4f 100644
--- a/scripts/ytdlp_channel_info.ts
+++ b/scripts/ytdlp_channel_info.ts
@@ -17,7 +17,7 @@ async function dfile(path: string, url: string) {
console.log(`thumbnail download ${path} from ${url}`);
const r = await fetch(url)
if (!r.body) return console.error("thumbnail download failed");
- await Deno.writeFile(path, r.body)
+ await Deno.writeFile(path, new Uint8Array(await r.arrayBuffer()))
}
async function save_infojson(url: string, key: string, data: { [key: string]: unknown }) {