From 1a893f9c704737e9e19d24cf9d9a7afb041302c3 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 4 Sep 2018 11:55:43 +0200 Subject: Do not import live streaming --- server/helpers/youtube-dl.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'server') diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index b0990ff68..6738090f3 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts @@ -21,6 +21,7 @@ function getYoutubeDLInfo (url: string): Promise { const youtubeDL = await safeGetYoutubeDL() youtubeDL.getInfo(url, options, (err, info) => { if (err) return rej(err) + if (info.is_live === true) return rej(new Error('Cannot download a live streaming.')) const obj = buildVideoInfo(normalizeObject(info)) if (obj.name && obj.name.length < CONSTRAINTS_FIELDS.VIDEOS.NAME.min) obj.name += ' video' -- cgit v1.2.3