Use existing Force IPV4 Config
This commit is contained in:
@ -528,9 +528,6 @@ type DownloadOptions struct {
|
|||||||
// The index of the entry to download from the playlist that would be
|
// The index of the entry to download from the playlist that would be
|
||||||
// passed to youtube-dl via --playlist-items. The index value starts at 1
|
// passed to youtube-dl via --playlist-items. The index value starts at 1
|
||||||
PlaylistIndex int
|
PlaylistIndex int
|
||||||
|
|
||||||
// -4 Make all connections via IPv4
|
|
||||||
UseIPV4 bool
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (result Result) DownloadWithOptions(
|
func (result Result) DownloadWithOptions(
|
||||||
@ -613,7 +610,7 @@ func (result Result) DownloadWithOptions(
|
|||||||
cmd.Args = append(cmd.Args, "--load-info", jsonTempPath)
|
cmd.Args = append(cmd.Args, "--load-info", jsonTempPath)
|
||||||
}
|
}
|
||||||
//Force IPV4 Usage
|
//Force IPV4 Usage
|
||||||
if options.UseIPV4 {
|
if result.Options.UseIPV4 {
|
||||||
cmd.Args = append(cmd.Args, "-4")
|
cmd.Args = append(cmd.Args, "-4")
|
||||||
}
|
}
|
||||||
// don't need to specify if direct as there is only one
|
// don't need to specify if direct as there is only one
|
||||||
|
Reference in New Issue
Block a user