]> jfr.im git - yt-dlp.git/commitdiff
[options] Alias `--write-comments`, `--no-write-comments`
authorpukkandan <redacted>
Thu, 20 May 2021 10:10:35 +0000 (15:40 +0530)
committerpukkandan <redacted>
Thu, 20 May 2021 10:26:57 +0000 (15:56 +0530)
Closes: #264
README.md
yt_dlp/options.py

index d3856dc9fa371277faec9b71c57add9fa2deca31..c87f2e7763c8c8ba3b0a5bbd4947dc0104518000 100644 (file)
--- a/README.md
+++ b/README.md
@@ -483,10 +483,13 @@ ## Filesystem Options:
                                      could still contain some personal
                                      information (default)
     --no-clean-infojson              Write all fields to the infojson
-    --get-comments                   Retrieve video comments to be placed in the
-                                     .info.json file. The comments are fetched
-                                     even without this option if the extraction
-                                     is known to be quick
+    --write-comments                 Retrieve video comments to be placed in the
+                                     infojson. The comments are fetched even
+                                     without this option if the extraction is
+                                     known to be quick (Alias: --get-comments)
+    --no-write-comments              Do not retrieve video comments unless the
+                                     extraction is known to be quick
+                                     (Alias: --no-get-comments)
     --load-info-json FILE            JSON file containing the video information
                                      (created with the "--write-info-json"
                                      option)
index b99d5d202615848d6a3612775c6b45c361767ca1..695e085940f41a45ef72a0ff19887f4693db53c2 100644 (file)
@@ -1048,11 +1048,15 @@ def _dict_from_options_callback(
         action='store_false', dest='clean_infojson',
         help='Write all fields to the infojson')
     filesystem.add_option(
-        '--get-comments',
+        '--write-comments', '--get-comments',
         action='store_true', dest='getcomments', default=False,
         help=(
-            'Retrieve video comments to be placed in the .info.json file. '
-            'The comments are fetched even without this option if the extraction is known to be quick'))
+            'Retrieve video comments to be placed in the infojson. '
+            'The comments are fetched even without this option if the extraction is known to be quick (Alias: --get-comments)'))
+    filesystem.add_option(
+        '--no-write-comments', '--no-get-comments',
+        action='store_true', dest='getcomments', default=False,
+        help='Do not retrieve video comments unless the extraction is known to be quick (Alias: --no-get-comments)')
     filesystem.add_option(
         '--load-info-json', '--load-info',
         dest='load_info_filename', metavar='FILE',