X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Foptions.py;h=2e8c715084616a565472fb8700a8d995cb8c6d04;hb=c056efa2e3e450ef70f0b23559273e2ec0f4e218;hp=c182abfdc8f211b7c7520547926ba09b40bf1071;hpb=0b201a3134e9b343e2791f2686f1a34f737007a4;p=youtube-dl diff --git a/youtube_dl/options.py b/youtube_dl/options.py index c182abfdc..2e8c71508 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -8,6 +8,7 @@ import sys from .compat import ( compat_expanduser, compat_getenv, + compat_kwargs, ) from .utils import ( get_term_width, @@ -112,7 +113,7 @@ def parseOpts(overrideArguments=None): 'conflict_handler': 'resolve', } - parser = optparse.OptionParser(**kw) + parser = optparse.OptionParser(**compat_kwargs(kw)) general = optparse.OptionGroup(parser, 'General Options') general.add_option( @@ -221,7 +222,7 @@ def parseOpts(overrideArguments=None): selection.add_option( '--no-playlist', action='store_true', dest='noplaylist', default=False, - help='download only the currently playing video') + help='If the URL refers to a video and a playlist, download only the video.') selection.add_option( '--age-limit', metavar='YEARS', dest='age_limit', default=None, type=int, @@ -261,7 +262,8 @@ def parseOpts(overrideArguments=None): video_format.add_option( '-f', '--format', action='store', dest='format', metavar='FORMAT', default=None, - help='video format code, specify the order of preference using' + help=( + 'video format code, specify the order of preference using' ' slashes: -f 22/17/18 . -f mp4 , -f m4a and -f flv are also' ' supported. You can also use the special names "best",' ' "bestvideo", "bestaudio", "worst", "worstvideo" and' @@ -270,7 +272,7 @@ def parseOpts(overrideArguments=None): ' -f 136/137/mp4/bestvideo,140/m4a/bestaudio.' ' You can merge the video and audio of two formats into a single' ' file using -f + (requires ffmpeg or' - ' avconv), for example -f bestvideo+bestaudio.') + ' avconv), for example -f bestvideo+bestaudio.')) video_format.add_option( '--all-formats', action='store_const', dest='format', const='all', @@ -620,7 +622,7 @@ def parseOpts(overrideArguments=None): postproc.add_option( '--exec', metavar='CMD', dest='exec_cmd', - help='Execute a command on the file after downloading, similar to find\'s -exec syntax. Example: --exec \'adb push {} /sdcard/Music/ && rm {}\'' ) + help='Execute a command on the file after downloading, similar to find\'s -exec syntax. Example: --exec \'adb push {} /sdcard/Music/ && rm {}\'') parser.add_option_group(general) parser.add_option_group(selection)