aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl/youtube-dl-wrapper.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-18 11:40:07 +0200
committerChocobozzz <me@florianbigard.com>2022-08-18 11:40:07 +0200
commitea139ca870fcea1d784d0b2c8016a7cfa9a0a4c0 (patch)
tree16f09c21f46c40e03b69a775e56814cb6ad3be0d /server/helpers/youtube-dl/youtube-dl-wrapper.ts
parente5d771a390456cf0491b19ce6fe61b434006172c (diff)
downloadPeerTube-ea139ca870fcea1d784d0b2c8016a7cfa9a0a4c0.tar.gz
PeerTube-ea139ca870fcea1d784d0b2c8016a7cfa9a0a4c0.tar.zst
PeerTube-ea139ca870fcea1d784d0b2c8016a7cfa9a0a4c0.zip
Display error on youtube-dl get info failure
Diffstat (limited to 'server/helpers/youtube-dl/youtube-dl-wrapper.ts')
-rw-r--r--server/helpers/youtube-dl/youtube-dl-wrapper.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/helpers/youtube-dl/youtube-dl-wrapper.ts b/server/helpers/youtube-dl/youtube-dl-wrapper.ts
index 7cd5e3310..3264cc9ff 100644
--- a/server/helpers/youtube-dl/youtube-dl-wrapper.ts
+++ b/server/helpers/youtube-dl/youtube-dl-wrapper.ts
@@ -39,6 +39,8 @@ class YoutubeDLWrapper {
39 processOptions 39 processOptions
40 }) 40 })
41 41
42 if (!info) throw new Error(`YoutubeDL could not get info from ${this.url}`)
43
42 if (info.is_live === true) throw new Error('Cannot download a live streaming.') 44 if (info.is_live === true) throw new Error('Cannot download a live streaming.')
43 45
44 const infoBuilder = new YoutubeDLInfoBuilder(info) 46 const infoBuilder = new YoutubeDLInfoBuilder(info)