summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrei Troie <[email protected]>2015-01-10 00:03:11 +0000
committerAndrei Troie <[email protected]>2015-01-10 00:03:11 +0000
commit34c781a24d1cc9b424ddc3ab3c4c616f49642c6a (patch)
tree8b7c6f3c30185b406d513cab8a64e14d302b2317
parentd120e9013f8dbab7e82fe1878e9b5e5e9bb94e88 (diff)
downloadyoutube-dl-34c781a24d1cc9b424ddc3ab3c4c616f49642c6a.tar.gz
youtube-dl-34c781a24d1cc9b424ddc3ab3c4c616f49642c6a.zip
Passing the option into the main program's arguments
-rw-r--r--youtube_dl/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 844992d8e..b4ae35a2b 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -166,6 +166,9 @@ def _real_main(argv=None):
if opts.recodevideo is not None:
if opts.recodevideo not in ['mp4', 'flv', 'webm', 'ogg', 'mkv']:
parser.error('invalid video recode format specified')
+ if opts.merge_output_format is not None and not '+' in opts.format: #if merge format output is used on videos that don't require merging, ignore
+ opts.merge_output_format = None
+
if opts.date is not None:
date = DateRange.day(opts.date)
else:
@@ -323,6 +326,7 @@ def _real_main(argv=None):
'encoding': opts.encoding,
'exec_cmd': opts.exec_cmd,
'extract_flat': opts.extract_flat,
+ 'merge_output_format': opts.merge_output_format,
'postprocessors': postprocessors,
}