diff options
Diffstat (limited to 'youtube_dl/options.py')
-rw-r--r-- | youtube_dl/options.py | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/youtube_dl/options.py b/youtube_dl/options.py index b38b8349f..dbc6f5528 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -201,6 +201,10 @@ def parseOpts(overrideArguments=None): dest='playlistend', metavar='NUMBER', default=None, type=int, help='playlist video to end at (default is last)') selection.add_option( + '--playlist-items', + dest='playlist_items', metavar='ITEM_SPEC', default=None, + help='playlist video items to download. Specify indices of the videos in the playlist seperated by commas like: "--playlist-items 1,2,5,8" if you want to download videos indexed 1, 2, 5, 8 in the playlist. You can specify range: "--playlist-items 1-3,7,10-13", it will download the videos at index 1, 2, 3, 7, 10, 11, 12 and 13.') + selection.add_option( '--match-title', dest='matchtitle', metavar='REGEX', help='download only matching titles (regex or caseless sub-string)') @@ -373,7 +377,7 @@ def parseOpts(overrideArguments=None): downloader.add_option( '-R', '--retries', dest='retries', metavar='RETRIES', default=10, - help='number of retries (default is %default)') + help='number of retries (default is %default), or "infinite".') downloader.add_option( '--buffer-size', dest='buffersize', metavar='SIZE', default='1024', @@ -391,6 +395,10 @@ def parseOpts(overrideArguments=None): action='store_true', help='Download playlist videos in reverse order') downloader.add_option( + '--xattr-set-filesize', + dest='xattr_set_filesize', action='store_true', + help='(experimental) set file xattribute ytdl.filesize with expected filesize') + downloader.add_option( '--external-downloader', dest='external_downloader', metavar='COMMAND', help='(experimental) Use the specified external downloader. ' @@ -615,10 +623,6 @@ def parseOpts(overrideArguments=None): action='store_true', dest='writeannotations', default=False, help='write video annotations to a .annotation file') filesystem.add_option( - '--write-thumbnail', - action='store_true', dest='writethumbnail', default=False, - help='write thumbnail image to disk') - filesystem.add_option( '--load-info', dest='load_info_filename', metavar='FILE', help='json file containing the video information (created with the "--write-json" option)') @@ -637,6 +641,20 @@ def parseOpts(overrideArguments=None): action='store_true', dest='rm_cachedir', help='Delete all filesystem cache files') + thumbnail = optparse.OptionGroup(parser, 'Thumbnail images') + thumbnail.add_option( + '--write-thumbnail', + action='store_true', dest='writethumbnail', default=False, + help='write thumbnail image to disk') + thumbnail.add_option( + '--write-all-thumbnails', + action='store_true', dest='write_all_thumbnails', default=False, + help='write all thumbnail image formats to disk') + thumbnail.add_option( + '--list-thumbnails', + action='store_true', dest='list_thumbnails', default=False, + help='Simulate and list all available thumbnail formats') + postproc = optparse.OptionGroup(parser, 'Post-processing Options') postproc.add_option( '-x', '--extract-audio', @@ -702,6 +720,7 @@ def parseOpts(overrideArguments=None): parser.add_option_group(selection) parser.add_option_group(downloader) parser.add_option_group(filesystem) + parser.add_option_group(thumbnail) parser.add_option_group(verbosity) parser.add_option_group(workarounds) parser.add_option_group(video_format) |