1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-12-25 06:25:51 +01:00

[options] Add -4 and -6 options

Fixes #520, fixes #3626.
This commit is contained in:
Philipp Hagemeister 2015-01-10 20:02:02 +01:00
parent be4a824d74
commit 500b8b41c1

View File

@ -179,6 +179,16 @@ def parseOpts(overrideArguments=None):
metavar='IP', dest='source_address', default=None, metavar='IP', dest='source_address', default=None,
help='Client-side IP address to bind to (experimental)', help='Client-side IP address to bind to (experimental)',
) )
network.add_option(
'-4', '--force-ipv4',
action='store_const', const='0.0.0.0', dest='source_address',
help='Make all connections via IPv4 (experimental)',
)
network.add_option(
'-6', '--force-ipv6',
action='store_const', const='::', dest='source_address',
help='Make all connections via IPv6 (experimental)',
)
selection = optparse.OptionGroup(parser, 'Video Selection') selection = optparse.OptionGroup(parser, 'Video Selection')
selection.add_option( selection.add_option(