aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-03-02 15:06:09 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-03-02 18:21:31 +0100
commitc75f0b361a1b00f6ac1298615d6fee101994b2b9 (patch)
treebbf8bc7765faf831b44cc5f36c5c22dfd977c316 /youtube_dl/__init__.py
parent295df4edb97e3c0dc0ecd95746bb2c455607a4a3 (diff)
[downloader/external] Add support for custom options (Fixes #4885, closes #5098)
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 49f382695..6056da1be 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -9,6 +9,7 @@ import codecs
import io
import os
import random
+import shlex
import sys
@@ -255,6 +256,9 @@ def _real_main(argv=None):
xattr # Confuse flake8
except ImportError:
parser.error('setting filesize xattr requested but python-xattr is not available')
+ external_downloader_args = None
+ if opts.external_downloader_args:
+ external_downloader_args = shlex.split(opts.external_downloader_args)
match_filter = (
None if opts.match_filter is None
else match_filter_func(opts.match_filter))
@@ -359,6 +363,7 @@ def _real_main(argv=None):
'no_color': opts.no_color,
'ffmpeg_location': opts.ffmpeg_location,
'hls_prefer_native': opts.hls_prefer_native,
+ 'external_downloader_args': external_downloader_args,
}
with YoutubeDL(ydl_opts) as ydl: