aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-04 11:34:46 +0200
committerChocobozzz <me@florianbigard.com>2018-09-04 11:34:46 +0200
commit5d112d0c3bff78546cfe9114499a76ac49a46a56 (patch)
tree03ca9e21a9fdefff0168c8edf50e1d0abae521b0 /server/helpers/youtube-dl.ts
parentea853b72823b9daff8bfea7177436d22951eb7ef (diff)
downloadPeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.tar.gz
PeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.tar.zst
PeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.zip
Fix video import with URL with small titles
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}