diff options
author | Chocobozzz <me@florianbigard.com> | 2018-09-04 11:34:46 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-09-04 11:34:46 +0200 |
commit | 5d112d0c3bff78546cfe9114499a76ac49a46a56 (patch) | |
tree | 03ca9e21a9fdefff0168c8edf50e1d0abae521b0 /server/helpers | |
parent | ea853b72823b9daff8bfea7177436d22951eb7ef (diff) | |
download | PeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.tar.gz PeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.tar.zst PeerTube-5d112d0c3bff78546cfe9114499a76ac49a46a56.zip |
Fix video import with URL with small titles
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/youtube-dl.ts | 5 |
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 | } |