Browse Source

[core] Support explicit `--no-list-formats` option

dirkf 2 weeks ago
parent
commit
617d4e6466
1 changed files with 4 additions and 0 deletions
  1. 4 0
      youtube_dl/options.py

+ 4 - 0
youtube_dl/options.py

@@ -404,6 +404,10 @@ def parseOpts(overrideArguments=None):
         '-F', '--list-formats',
         '-F', '--list-formats',
         action='store_true', dest='listformats',
         action='store_true', dest='listformats',
         help='List all available formats of requested videos')
         help='List all available formats of requested videos')
+    video_format.add_option(
+        '--no-list-formats',
+        action='store_false', dest='listformats',
+        help='Do not list available formats of requested videos (default)')
     video_format.add_option(
     video_format.add_option(
         '--youtube-include-dash-manifest',
         '--youtube-include-dash-manifest',
         action='store_true', dest='youtube_include_dash_manifest', default=True,
         action='store_true', dest='youtube_include_dash_manifest', default=True,