mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-06-29 14:14:54 +00:00
Cleanup after merge
This commit is contained in:
parent
072e68020d
commit
2699951172
14
README.md
14
README.md
@ -338,10 +338,10 @@ If you fork the project on GitHub, you can run your fork's [build workflow](.git
|
|||||||
--plugin-dirs PATH Path to an additional directory to search
|
--plugin-dirs PATH Path to an additional directory to search
|
||||||
for plugins. This option can be used
|
for plugins. This option can be used
|
||||||
multiple times to add multiple directories.
|
multiple times to add multiple directories.
|
||||||
Note that this currently only works for
|
Add "no-external" to disable searching
|
||||||
extractor plugins; postprocessor plugins can
|
default external plugin directories (outside
|
||||||
only be loaded from the default plugin
|
of python environment)
|
||||||
directories
|
--no-plugins Do not load plugins
|
||||||
--flat-playlist Do not extract a playlist's URL result
|
--flat-playlist Do not extract a playlist's URL result
|
||||||
entries; some entry metadata may be missing
|
entries; some entry metadata may be missing
|
||||||
and downloading may be bypassed
|
and downloading may be bypassed
|
||||||
@ -366,12 +366,6 @@ If you fork the project on GitHub, you can run your fork's [build workflow](.git
|
|||||||
sequences). Use "auto-tty" or "no_color-tty"
|
sequences). Use "auto-tty" or "no_color-tty"
|
||||||
to decide based on terminal support only.
|
to decide based on terminal support only.
|
||||||
Can be used multiple times
|
Can be used multiple times
|
||||||
--plugin-dirs PATH Directory to search for plugins. Can be used
|
|
||||||
multiple times to add multiple directories.
|
|
||||||
Add "no-external" to disable searching
|
|
||||||
default external plugin directories (outside
|
|
||||||
of python environment)
|
|
||||||
--no-plugins Do not load plugins
|
|
||||||
--compat-options OPTS Options that can help keep compatibility
|
--compat-options OPTS Options that can help keep compatibility
|
||||||
with youtube-dl or youtube-dlc
|
with youtube-dl or youtube-dlc
|
||||||
configurations by reverting some of the
|
configurations by reverting some of the
|
||||||
|
|||||||
@ -38,7 +38,6 @@ from .postprocessor import (
|
|||||||
)
|
)
|
||||||
from .update import Updater
|
from .update import Updater
|
||||||
from .utils import (
|
from .utils import (
|
||||||
Config,
|
|
||||||
NO_DEFAULT,
|
NO_DEFAULT,
|
||||||
POSTPROCESS_WHEN,
|
POSTPROCESS_WHEN,
|
||||||
DateRange,
|
DateRange,
|
||||||
@ -976,11 +975,6 @@ def _real_main(argv=None):
|
|||||||
|
|
||||||
parser, opts, all_urls, ydl_opts = parse_options(argv)
|
parser, opts, all_urls, ydl_opts = parse_options(argv)
|
||||||
|
|
||||||
# HACK: Set the plugin dirs early on
|
|
||||||
# TODO(coletdjnz): remove when plugin globals system is implemented
|
|
||||||
if opts.plugin_dirs is not None:
|
|
||||||
Config._plugin_dirs = list(map(expand_path, opts.plugin_dirs))
|
|
||||||
|
|
||||||
# Dump user agent
|
# Dump user agent
|
||||||
if opts.dump_user_agent:
|
if opts.dump_user_agent:
|
||||||
ua = traverse_obj(opts.headers, 'User-Agent', casesense=False, default=std_headers['User-Agent'])
|
ua = traverse_obj(opts.headers, 'User-Agent', casesense=False, default=std_headers['User-Agent'])
|
||||||
|
|||||||
@ -410,12 +410,19 @@ def create_parser():
|
|||||||
'("-" for stdin). Can be used multiple times and inside other configuration files'))
|
'("-" for stdin). Can be used multiple times and inside other configuration files'))
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--plugin-dirs',
|
'--plugin-dirs',
|
||||||
dest='plugin_dirs', metavar='PATH', action='append',
|
metavar='PATH',
|
||||||
|
dest='plugin_dirs',
|
||||||
|
action='append',
|
||||||
help=(
|
help=(
|
||||||
'Path to an additional directory to search for plugins. '
|
'Path to an additional directory to search for plugins. '
|
||||||
'This option can be used multiple times to add multiple directories. '
|
'This option can be used multiple times to add multiple directories. '
|
||||||
'Note that this currently only works for extractor plugins; '
|
'Add "no-external" to disable searching default external plugin directories (outside of python environment)'))
|
||||||
'postprocessor plugins can only be loaded from the default plugin directories'))
|
general.add_option(
|
||||||
|
'--no-plugins',
|
||||||
|
dest='plugins_enabled',
|
||||||
|
action='store_false',
|
||||||
|
default=True,
|
||||||
|
help='Do not load plugins')
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--flat-playlist',
|
'--flat-playlist',
|
||||||
action='store_const', dest='extract_flat', const='in_playlist', default=False,
|
action='store_const', dest='extract_flat', const='in_playlist', default=False,
|
||||||
@ -474,24 +481,6 @@ def create_parser():
|
|||||||
'"no_color" (use non color terminal sequences). '
|
'"no_color" (use non color terminal sequences). '
|
||||||
'Use "auto-tty" or "no_color-tty" to decide based on terminal support only. '
|
'Use "auto-tty" or "no_color-tty" to decide based on terminal support only. '
|
||||||
'Can be used multiple times'))
|
'Can be used multiple times'))
|
||||||
|
|
||||||
general.add_option(
|
|
||||||
'--plugin-dirs',
|
|
||||||
metavar='PATH',
|
|
||||||
dest='plugin_dirs',
|
|
||||||
action='append',
|
|
||||||
help=(
|
|
||||||
'Directory to search for plugins. Can be used multiple times to add multiple directories. '
|
|
||||||
'Add "no-external" to disable searching default external plugin directories (outside of python environment)'
|
|
||||||
),
|
|
||||||
)
|
|
||||||
general.add_option(
|
|
||||||
'--no-plugins',
|
|
||||||
dest='plugins_enabled',
|
|
||||||
action='store_false',
|
|
||||||
default=True,
|
|
||||||
help='Do not load plugins',
|
|
||||||
)
|
|
||||||
general.add_option(
|
general.add_option(
|
||||||
'--compat-options',
|
'--compat-options',
|
||||||
metavar='OPTS', dest='compat_opts', default=set(), type='str',
|
metavar='OPTS', dest='compat_opts', default=set(), type='str',
|
||||||
|
|||||||
@ -4887,10 +4887,6 @@ class Config:
|
|||||||
filename = None
|
filename = None
|
||||||
__initialized = False
|
__initialized = False
|
||||||
|
|
||||||
# Internal only, do not use! Hack to enable --plugin-dirs
|
|
||||||
# TODO(coletdjnz): remove when plugin globals system is implemented
|
|
||||||
_plugin_dirs = None
|
|
||||||
|
|
||||||
def __init__(self, parser, label=None):
|
def __init__(self, parser, label=None):
|
||||||
self.parser, self.label = parser, label
|
self.parser, self.label = parser, label
|
||||||
self._loaded_paths, self.configs = set(), []
|
self._loaded_paths, self.configs = set(), []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user