1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-11-13 21:15:15 +00:00

[cleanup] Misc (#14767)

Authored by: bashonly, sepro, matyb08

Co-authored-by: sepro <sepro@sepr0.com>
Co-authored-by: matyb08 <suricate66@protonmail.com>
This commit is contained in:
bashonly
2025-11-09 08:07:10 -06:00
committed by GitHub
parent f3c255b63b
commit c63b4e2a2b
4 changed files with 42 additions and 22 deletions

View File

@@ -10,6 +10,8 @@ Core Maintainers are responsible for reviewing and merging contributions, publis
**You can contact the core maintainers via `maintainers@yt-dlp.org`.**
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)
[![gh-sponsor](https://img.shields.io/badge/_-Github-white.svg?logo=github&labelColor=555555&style=for-the-badge)](https://github.com/sponsors/coletdjnz)

View File

@@ -360,7 +360,7 @@ Tip: Use `CTRL`+`F` (or `Command`+`F`) to search by keywords
containing directory ("-" for stdin). Can be
used multiple times and inside other
configuration files
--plugin-dirs PATH Path to an additional directory to search
--plugin-dirs DIR Path to an additional directory to search
for plugins. This option can be used
multiple 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 keywords
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.
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 by
previous --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. Available
categories 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 from
the video file, separated by commas. If a
@@ -1174,7 +1184,7 @@ Predefined aliases for convenience and ease of use. Note that future
You 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`

4
devscripts/update_ejs.py Normal file → Executable file
View File

@@ -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)

View File

@@ -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=[],