From 9fa0ea41aaa511bed3aa179dacc312fad6170c21 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 21 Nov 2018 16:29:09 +0100 Subject: [PATCH] Fix youtube video import --- server/helpers/youtube-dl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index 70b4e1b78..2a5663042 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 { return new Promise(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.')) -- 2.41.0