Fix youtube-dl ipv4 PR
This commit is contained in:
parent
677012b4ee
commit
e0409585a7
|
@ -285,9 +285,10 @@ import:
|
||||||
videos:
|
videos:
|
||||||
http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
|
http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# IPv6 is very strongly rate-limited on most sites supported by youtube-dl
|
# IPv6 is very strongly rate-limited on most sites supported by youtube-dl
|
||||||
forceipv4:
|
force_ipv4: false
|
||||||
enabled: true
|
|
||||||
# You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
|
# You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
|
||||||
proxy:
|
proxy:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -299,9 +299,10 @@ import:
|
||||||
videos:
|
videos:
|
||||||
http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
|
http: # Classic HTTP or all sites supported by youtube-dl https://rg3.github.io/youtube-dl/supportedsites.html
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
# IPv6 is very strongly rate-limited on most sites supported by youtube-dl
|
# IPv6 is very strongly rate-limited on most sites supported by youtube-dl
|
||||||
forceipv4:
|
force_ipv4: false
|
||||||
enabled: true
|
|
||||||
# You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
|
# You can use an HTTP/HTTPS/SOCKS proxy with youtube-dl
|
||||||
proxy:
|
proxy:
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
|
@ -34,7 +34,11 @@ const processOptions = {
|
||||||
function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
|
function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
|
||||||
return new Promise<YoutubeDLInfo>((res, rej) => {
|
return new Promise<YoutubeDLInfo>((res, rej) => {
|
||||||
let args = opts || [ '-j', '--flat-playlist' ]
|
let args = opts || [ '-j', '--flat-playlist' ]
|
||||||
if (CONFIG.IMPORT.VIDEOS.HTTP.FORCEIPV4) args.push('--force-ipv4')
|
|
||||||
|
if (CONFIG.IMPORT.VIDEOS.HTTP.FORCE_IPV4) {
|
||||||
|
args.push('--force-ipv4')
|
||||||
|
}
|
||||||
|
|
||||||
args = wrapWithProxyOptions(args)
|
args = wrapWithProxyOptions(args)
|
||||||
|
|
||||||
safeGetYoutubeDL()
|
safeGetYoutubeDL()
|
||||||
|
|
|
@ -229,9 +229,7 @@ const CONFIG = {
|
||||||
VIDEOS: {
|
VIDEOS: {
|
||||||
HTTP: {
|
HTTP: {
|
||||||
get ENABLED () { return config.get<boolean>('import.videos.http.enabled') },
|
get ENABLED () { return config.get<boolean>('import.videos.http.enabled') },
|
||||||
FORCEIPV4: {
|
get FORCE_IPV4 () { return config.get<boolean>('import.videos.http.force_ipv4') },
|
||||||
get ENABLED () { return config.get<boolean>('import.videos.http.forceipv4.enabled') }
|
|
||||||
},
|
|
||||||
PROXY: {
|
PROXY: {
|
||||||
get ENABLED () { return config.get<boolean>('import.videos.http.proxy.enabled') },
|
get ENABLED () { return config.get<boolean>('import.videos.http.proxy.enabled') },
|
||||||
get URL () { return config.get<string>('import.videos.http.proxy.url') }
|
get URL () { return config.get<string>('import.videos.http.proxy.url') }
|
||||||
|
|
Loading…
Reference in New Issue