Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Custom option --bind-address #1020
Comments
|
Starting from youtube-dl 2015.01.10.1, you can make use of the |
Hello, since I use tortoise svn i cannot make a pull request so I share it this way:
I made a new option --bind-address which let you choose what address you will use to download with youtube-dl, of course, this address should be available for your computer.
in init.py @ line 152, add this:
general.add_option('--bind-address', dest='bindaddress', default=None, help='Use the specified ip address', metavar='CUSTOMIP')
Then in init.py @ line 350 after: opts, args = parser.parse_args(argv)
add this:
if opts.bindaddress:
true_socket = socket.socket
def bound_socket(_a, *_k):
sock = true_socket(_a, *_k)
sock.bind(("%s" % opts.bindaddress, 0))
return sock
socket.socket = bound_socket
Finally still in init.py, add this @ line 590:
'bindaddress': opts.bindaddress,
Sorry for this way of posting but i'm not familiar with Git.