ActivityPub-federated video streaming platform using P2P directly in your web browser
Fix downloading youtube-dl
Chocobozzzefc7f234942e
diff --git a/server/core/helpers/youtube-dl/youtube-dl-cli.ts b/server/core/helpers/youtube-dl/youtube-dl-cli.tsindex 3a6e2f7251..2e7aec2dc1 100644--- a/server/core/helpers/youtube-dl/youtube-dl-cli.ts+++ b/server/core/helpers/youtube-dl/youtube-dl-cli.ts@@ -34,7 +34,7 @@ export class YoutubeDLCLI {const gotOptions: OptionsOfBufferResponseBody = {context: { bodyKBLimit: 100_000 },- responseType: 'buffer' as 'buffer'+ responseType: 'buffer'}if (process.env.YOUTUBE_DL_DOWNLOAD_BEARER_TOKEN) {@@ -47,7 +47,7 @@ export class YoutubeDLCLI {let gotResult = await unsafeSSRFGot(url, gotOptions)if (!isBinaryResponse(gotResult)) {- const json = JSON.parse(gotResult.body.toString())+ const json = JSON.parse(Buffer.from(gotResult.rawBody).toString())const latest = json.filter(release => release.prerelease === false)[0]if (!latest) throw new Error('Cannot find latest release')