aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/youtube-dl.ts')
-rw-r--r--server/helpers/youtube-dl.ts5
1 files 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<YoutubeDLInfo> {
22 youtubeDL.getInfo(url, options, (err, info) => { 22 youtubeDL.getInfo(url, options, (err, info) => {
23 if (err) return rej(err) 23 if (err) return rej(err)
24 24
25 const obj = normalizeObject(info) 25 const obj = buildVideoInfo(normalizeObject(info))
26 if (obj.name && obj.name.length < CONSTRAINTS_FIELDS.VIDEOS.NAME.min) obj.name += ' video'
26 27
27 return res(buildVideoInfo(obj)) 28 return res(obj)
28 }) 29 })
29 }) 30 })
30} 31}