From 5d112d0c3bff78546cfe9114499a76ac49a46a56 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 4 Sep 2018 11:34:46 +0200 Subject: [PATCH] Fix video import with URL with small titles --- server/helpers/youtube-dl.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts index 0afc54fd2..b0990ff68 100644 --- a/server/helpers/youtube-dl.ts +++ b/server/helpers/youtube-dl.ts @@ -22,9 +22,10 @@ function getYoutubeDLInfo (url: string): Promise { youtubeDL.getInfo(url, options, (err, info) => { if (err) return rej(err) - const obj = normalizeObject(info) + const obj = buildVideoInfo(normalizeObject(info)) + if (obj.name && obj.name.length < CONSTRAINTS_FIELDS.VIDEOS.NAME.min) obj.name += ' video' - return res(buildVideoInfo(obj)) + return res(obj) }) }) } -- 2.25.1