Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Fix youtube video import

Chocobozzz9fa0ea41aaa5
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts
index 70b4e1b780..2a56630427 100644
--- a/server/helpers/youtube-dl.ts
+++ b/server/helpers/youtube-dl.ts
@@ -24,10 +24,10 @@ const processOptions = {
function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
return new Promise<YoutubeDLInfo>(async (res, rej) => {
- const options = opts || [ '-j', '--flat-playlist' ]
+ const args = opts || [ '-j', '--flat-playlist' ]
const youtubeDL = await safeGetYoutubeDL()
- youtubeDL.getInfo(url, options, (err, info) => {
+ youtubeDL.getInfo(url, args, processOptions, (err, info) => {
if (err) return rej(err)
if (info.is_live === true) return rej(new Error('Cannot download a live streaming.'))