aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/youtube-dl.ts1
-rw-r--r--server/initializers/config.ts3
2 files changed, 4 insertions, 0 deletions
diff --git a/server/helpers/youtube-dl.ts b/server/helpers/youtube-dl.ts
index c2aa8870a..8733fe6cf 100644
--- a/server/helpers/youtube-dl.ts
+++ b/server/helpers/youtube-dl.ts
@@ -34,6 +34,7 @@ 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 args = wrapWithProxyOptions(args) 38 args = wrapWithProxyOptions(args)
38 39
39 safeGetYoutubeDL() 40 safeGetYoutubeDL()
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index b70361aa9..d1bbbc9a7 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -229,6 +229,9 @@ const CONFIG = {
229 VIDEOS: { 229 VIDEOS: {
230 HTTP: { 230 HTTP: {
231 get ENABLED () { return config.get<boolean>('import.videos.http.enabled') }, 231 get ENABLED () { return config.get<boolean>('import.videos.http.enabled') },
232 FORCEIPV4: {
233 get ENABLED () { return config.get<boolean>('import.videos.http.forceipv4.enabled') }
234 },
232 PROXY: { 235 PROXY: {
233 get ENABLED () { return config.get<boolean>('import.videos.http.proxy.enabled') }, 236 get ENABLED () { return config.get<boolean>('import.videos.http.proxy.enabled') },
234 get URL () { return config.get<string>('import.videos.http.proxy.url') } 237 get URL () { return config.get<string>('import.videos.http.proxy.url') }