diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-10 02:03:00 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-10 02:03:00 +0100 |
commit | bd1a281ede1548ae0f0c74360eb518751c2a4526 (patch) | |
tree | 1976d14f2df80e8d2e3598822d9e4c1bc1e6339d | |
parent | 45598f15788568a8432da19544e5bdc390032aca (diff) |
[options] PEP8 and simpler --merge-output-format handling (#4673)
-rw-r--r-- | youtube_dl/__init__.py | 4 | ||||
-rw-r--r-- | youtube_dl/options.py | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index b4ae35a2b..8e7b74466 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -166,9 +166,7 @@ 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: diff --git a/youtube_dl/options.py b/youtube_dl/options.py index 0ed5e3db4..14006178d 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -303,10 +303,10 @@ def parseOpts(overrideArguments=None): action='store_false', dest='youtube_include_dash_manifest', help='Do not download the DASH manifest on YouTube videos') video_format.add_option( - '--merge-output-format', - action='store', dest='merge_output_format', metavar='FORMAT' ,default=None, + '--merge-output-format', + action='store', dest='merge_output_format', metavar='FORMAT', default=None, help=( - 'If a merge is required (e.g. bestvideo+bestaudio), output to given container format (e.g. mkv, mp4, ogg, webm, flv) ' + 'If a merge is required (e.g. bestvideo+bestaudio), output to given container format. One of mkv, mp4, ogg, webm, flv.' 'Ignored if no merge is required')) subtitles = optparse.OptionGroup(parser, 'Subtitle Options') |