A feature-rich command-line audio/video downloader
[cleanup] Misc (#14767)
bashonlyc63b4e2a2b81
diff --git a/Maintainers.md b/Maintainers.mdindex 8b52daf5fa..515505d882 100644--- a/Maintainers.md+++ b/Maintainers.md@@ -10,6 +10,8 @@ Core Maintainers are responsible for reviewing and merging contributions, publis**You can contact the core maintainers via `[email protected]`.**+This is **NOT** a support channel. [Open an issue](https://github.com/yt-dlp/yt-dlp/issues/new/choose) if you need help or want to report a bug.+### [coletdjnz](https://github.com/coletdjnz)[](https://github.com/sponsors/coletdjnz)diff --git a/README.md b/README.mdindex 0274b6fe9f..6366c5d4c6 100644--- a/README.md+++ b/README.md@@ -360,7 +360,7 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywordscontaining directory ("-" for stdin). Can beused multiple times and inside otherconfiguration files- --plugin-dirs PATH Path to an additional directory to search+ --plugin-dirs DIR Path to an additional directory to searchfor plugins. This option can be usedmultiple times to add multiple directories.Use "default" to search the default plugin@@ -372,19 +372,28 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywordswith an optional path to the runtimelocation. This option can be used multipletimes to enable multiple runtimes. Supported- runtimes: deno, node, bun, quickjs. By- default, only "deno" runtime is enabled.+ runtimes are (in order of priority, from+ highest to lowest): deno, node, quickjs,+ bun. Only "deno" is enabled by default. The+ highest priority runtime that is both+ enabled and available will be used. In order+ to use a lower priority runtime when "deno"+ is available, --no-js-runtimes needs to be+ passed before enabling other runtimes--no-js-runtimes Clear JavaScript runtimes to enable,including defaults and those provided byprevious --js-runtimes--remote-components COMPONENT Remote components to allow yt-dlp to fetch- when required. You can use this option- multiple times to allow multiple components.- Supported values: ejs:npm (external- JavaScript components from npm), ejs:github- (external JavaScript components from yt-dlp-- ejs GitHub). By default, no remote- components are allowed.+ when required. This option is currently not+ needed if you are using an official+ executable or have the requisite version of+ the yt-dlp-ejs package installed. You can+ use this option multiple times to allow+ multiple components. Supported values:+ ejs:npm (external JavaScript components from+ npm), ejs:github (external JavaScript+ components from yt-dlp-ejs GitHub). By+ default, no remote components are allowed--no-remote-components Disallow fetching of all remote components,including any previously allowed by--remote-components or defaults.@@ -1105,11 +1114,12 @@ Make chapter entries for, or remove various segments (sponsor,for, separated by commas. Availablecategories are sponsor, intro, outro,selfpromo, preview, filler, interaction,- music_offtopic, poi_highlight, chapter, all- and default (=all). You can prefix the- category with a "-" to exclude it. See [1]- for descriptions of the categories. E.g.- --sponsorblock-mark all,-preview+ music_offtopic, hook, poi_highlight,+ chapter, all and default (=all). You can+ prefix the category with a "-" to exclude+ it. See [1] for descriptions of the+ categories. E.g. --sponsorblock-mark+ all,-preview[1] https://wiki.sponsor.ajay.app/w/Segment_Categories--sponsorblock-remove CATS SponsorBlock categories to be removed fromthe video file, separated by commas. If a@@ -1174,7 +1184,7 @@ Predefined aliases for convenience and ease of use. Note that futureYou can configure yt-dlp by placing any supported command line option in a configuration file. The configuration is loaded from the following locations:1. **Main Configuration**:- * The file given to `--config-location`+ * The file given to `--config-locations`1. **Portable Configuration**: (Recommended for portable installations)* If using a binary, `yt-dlp.conf` in the same directory as the binary* If running from source-code, `yt-dlp.conf` in the parent directory of `yt_dlp`@@ -1256,7 +1266,7 @@ yt-dlp --netrc-cmd 'gpg --decrypt ~/.authinfo.gpg' 'https://www.youtube.com/watc### Notes about environment variables* Environment variables are normally specified as `${VARIABLE}`/`$VARIABLE` on UNIX and `%VARIABLE%` on Windows; but is always shown as `${VARIABLE}` in this documentation-* yt-dlp also allows using UNIX-style variables on Windows for path-like options; e.g. `--output`, `--config-location`+* yt-dlp also allows using UNIX-style variables on Windows for path-like options; e.g. `--output`, `--config-locations`* If unset, `${XDG_CONFIG_HOME}` defaults to `~/.config` and `${XDG_CACHE_HOME}` to `~/.cache`* On Windows, `~` points to `${HOME}` if present; or, `${USERPROFILE}` or `${HOMEDRIVE}${HOMEPATH}` otherwise* On Windows, `${USERPROFILE}` generally points to `C:\Users\<user name>` and `${APPDATA}` to `${USERPROFILE}\AppData\Roaming`diff --git a/devscripts/update_ejs.py b/devscripts/update_ejs.pyold mode 100644new mode 100755index cffb1aa2b4..3aa76bd0ce--- a/devscripts/update_ejs.py+++ b/devscripts/update_ejs.py@@ -66,7 +66,9 @@ def list_wheel_contents() -> str:assert folders or files, 'at least one of "folders" or "files" must be True'- path_gen = (zinfo.filename for zinfo in zipfile.ZipFile(io.BytesIO(wheel_data)).infolist())+ with zipfile.ZipFile(io.BytesIO(wheel_data)) as zipf:+ path_gen = (zinfo.filename for zinfo in zipf.infolist())+filtered = filter(lambda path: path.startswith('yt_dlp_ejs/'), path_gen)if suffix:filtered = filter(lambda path: path.endswith(f'.{suffix}'), filtered)diff --git a/yt_dlp/options.py b/yt_dlp/options.pyindex 43fa2f84b9..6315ef8a9a 100644--- a/yt_dlp/options.py+++ b/yt_dlp/options.py@@ -441,7 +441,7 @@ def create_parser():'("-" for stdin). Can be used multiple times and inside other configuration files'))general.add_option('--plugin-dirs',- metavar='PATH',+ metavar='DIR',dest='plugin_dirs',action='callback',callback=_list_from_options_callback,@@ -468,7 +468,10 @@ def create_parser():help=('Additional JavaScript runtime to enable, with an optional path to the runtime location. ''This option can be used multiple times to enable multiple runtimes. '- 'Supported runtimes: deno, node, bun, quickjs. By default, only "deno" runtime is enabled.'))+ 'Supported runtimes are (in order of priority, from highest to lowest): deno, node, quickjs, bun. '+ 'Only "deno" is enabled by default. The highest priority runtime that is both enabled and '+ 'available will be used. In order to use a lower priority runtime when "deno" is available, '+ '--no-js-runtimes needs to be passed before enabling other runtimes'))general.add_option('--no-js-runtimes',dest='js_runtimes', action='store_const', const=[],@@ -484,9 +487,12 @@ def create_parser():default=[],help=('Remote components to allow yt-dlp to fetch when required. '+ 'This option is currently not needed if you are using an official executable '+ 'or have the requisite version of the yt-dlp-ejs package installed. ''You can use this option multiple times to allow multiple components. '- 'Supported values: ejs:npm (external JavaScript components from npm), ejs:github (external JavaScript components from yt-dlp-ejs GitHub). '- 'By default, no remote components are allowed.'))+ 'Supported values: ejs:npm (external JavaScript components from npm), '+ 'ejs:github (external JavaScript components from yt-dlp-ejs GitHub). '+ 'By default, no remote components are allowed'))general.add_option('--no-remote-components',dest='remote_components', action='store_const', const=[],