Fix video import with URL with small titles

This commit is contained in:
Chocobozzz 2018-09-04 11:34:46 +02:00
parent ea853b7282
commit 5d112d0c3b
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 3 additions and 2 deletions

View File

@ -22,9 +22,10 @@ function getYoutubeDLInfo (url: string): Promise<YoutubeDLInfo> {
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)
})
})
}