aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/youtube-dl.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-18 14:11:15 +0100
committerChocobozzz <me@florianbigard.com>2020-11-18 14:11:15 +0100
commite0409585a744ab7b41869bc08bfb2b33febe3bba (patch)
treef43718d68fa7adaad65c846af1fc9b280829b7a1 /server/helpers/youtube-dl.ts
parent677012b4ee53e5099e8c90445616644e1a6af9ef (diff)
downloadPeerTube-e0409585a744ab7b41869bc08bfb2b33febe3bba.tar.gz
PeerTube-e0409585a744ab7b41869bc08bfb2b33febe3bba.tar.zst
PeerTube-e0409585a744ab7b41869bc08bfb2b33febe3bba.zip
Fix youtube-dl ipv4 PR
Diffstat (limited to 'server/helpers/youtube-dl.ts')
-rw-r--r--server/helpers/youtube-dl.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts
index 8733fe6cf..302b2e206 100644
--- a/server/helpers/youtube-dl.ts
+++ b/server/helpers/youtube-dl.ts
@@ -34,7 +34,11 @@ const processOptions = {
34function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> { 34function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
35 return new Promise<YoutubeDLInfo>((res, rej) => { 35 return new Promise<YoutubeDLInfo>((res, rej) => {
36 let args = opts || [ '-j', '--flat-playlist' ] 36 let args = opts || [ '-j', '--flat-playlist' ]
37 if (CONFIG.IMPORT.VIDEOS.HTTP.FORCEIPV4) args.push('--force-ipv4') 37
38 if (CONFIG.IMPORT.VIDEOS.HTTP.FORCE_IPV4) {
39 args.push('--force-ipv4')
40 }
41
38 args = wrapWithProxyOptions(args) 42 args = wrapWithProxyOptions(args)
39 43
40 safeGetYoutubeDL() 44 safeGetYoutubeDL()