From: Chocobozzz Date: Wed, 21 Nov 2018 15:29:09 +0000 (+0100) Subject: Fix youtube video import X-Git-Tag: v1.1.0-rc.1~9 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9fa0ea41aaa511bed3aa179dacc312fad6170c21;p=oweals%2Fpeertube.git Fix youtube video import --- 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.'))