]> jfr.im git - yt-dlp.git/commitdiff
Add `--compat-options 2021,2022`
authorpukkandan <redacted>
Sun, 1 Jan 2023 08:12:43 +0000 (13:42 +0530)
committerpukkandan <redacted>
Sun, 1 Jan 2023 08:41:15 +0000 (14:11 +0530)
Use these to guard against future compat changes. This allows devs to
change defaults and make other potentially breaking changes more easily.
If you need everything to work exactly as-is, put this in your config

README.md
yt_dlp/options.py

index 4294090dc58fe992e603761e0dd6db394fd09b91..f6bf1175e265cbeb8d66c2db56726ed5ec9f5780 100644 (file)
--- a/README.md
+++ b/README.md
@@ -159,6 +159,8 @@ ### Differences in default behavior
 * `--compat-options all`: Use all compat options (Do NOT use)
 * `--compat-options youtube-dl`: Same as `--compat-options all,-multistreams`
 * `--compat-options youtube-dlc`: Same as `--compat-options all,-no-live-chat,-no-youtube-channel-redirect`
+* `--compat-options 2021`: Same as `--compat-options 2022,no-certifi,filename-sanitization,no-youtube-prefer-utc-upload-date`
+* `--compat-options 2022`: Currently does nothing. Use this to enable all future compat options
 
 
 # INSTALLATION
index be4695cbb58b24546192db532466d76e31d02d45..e9766c02d77da87d5f6a51c889f593c0c66f90bb 100644 (file)
@@ -470,6 +470,8 @@ def _alias_callback(option, opt_str, value, parser, opts, nargs):
             }, 'aliases': {
                 'youtube-dl': ['all', '-multistreams'],
                 'youtube-dlc': ['all', '-no-youtube-channel-redirect', '-no-live-chat'],
+                '2021': ['2022', 'no-certifi', 'filename-sanitization', 'no-youtube-prefer-utc-upload-date'],
+                '2022': [],
             }
         }, help=(
             'Options that can help keep compatibility with youtube-dl or youtube-dlc '