mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-12 20:45:15 +00:00
Closes #14404, Closes #14431, Closes #14680, Closes #14707 Authored by: bashonly, coletdjnz, seproDev, Grub4K Co-authored-by: coletdjnz <coletdjnz@protonmail.com> Co-authored-by: bashonly <bashonly@protonmail.com> Co-authored-by: sepro <sepro@sepr0.com>
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
from __future__ import annotations
|
|
import os
|
|
from collections import defaultdict
|
|
|
|
# Please Note: Due to necessary changes and the complex nature involved in the plugin/globals system,
|
|
# no backwards compatibility is guaranteed for the plugin system API.
|
|
# However, we will still try our best.
|
|
|
|
|
|
class Indirect:
|
|
def __init__(self, initial, /):
|
|
self.value = initial
|
|
|
|
def __repr__(self, /):
|
|
return f'{type(self).__name__}({self.value!r})'
|
|
|
|
|
|
postprocessors = Indirect({})
|
|
extractors = Indirect({})
|
|
|
|
# Plugins
|
|
all_plugins_loaded = Indirect(False)
|
|
plugin_specs = Indirect({})
|
|
plugin_dirs = Indirect(['default'])
|
|
|
|
plugin_ies = Indirect({})
|
|
plugin_pps = Indirect({})
|
|
plugin_ies_overrides = Indirect(defaultdict(list))
|
|
|
|
# Misc
|
|
IN_CLI = Indirect(False)
|
|
LAZY_EXTRACTORS = Indirect(None) # `False`=force, `None`=disabled, `True`=enabled
|
|
WINDOWS_VT_MODE = Indirect(False if os.name == 'nt' else None)
|
|
|
|
# JS Runtimes
|
|
# If adding support for another runtime, register it here to allow `js_runtimes` option to accept it.
|
|
# key is the runtime name, value a JsRuntime subclass (internal-only) or None
|
|
supported_js_runtimes = Indirect({})
|
|
|
|
# List of remote components supported with --remote-components option
|
|
supported_remote_components = Indirect([])
|