yt-dlp/yt_dlp/_globals.py

20 lines
770 B
Python
Raw Normal View History

2023-01-07 08:19:13 +01:00
from collections import defaultdict
from contextvars import ContextVar
2024-10-19 16:25:36 +13:00
# Internal only - no backwards compatibility guaranteed
2023-01-07 08:19:13 +01:00
postprocessors = ContextVar('postprocessors', default={})
extractors = ContextVar('extractors', default={})
IN_CLI = ContextVar('IN_CLI', default=False)
# `False`=force, `None`=disabled, `True`=enabled
2023-01-16 04:53:41 +01:00
LAZY_EXTRACTORS = ContextVar('LAZY_EXTRACTORS', default=False)
2023-01-07 08:19:13 +01:00
# Whether plugins have been loaded once
ALL_PLUGINS_LOADED = ContextVar('PLUGINS_LOADED', default=False)
2024-10-19 16:40:16 +13:00
# `...`=search default plugin dirs
2023-01-16 04:53:41 +01:00
plugin_dirs = ContextVar('plugin_dirs', default=(..., ))
2023-01-07 08:19:13 +01:00
plugin_ies = ContextVar('plugin_ies', default={})
plugin_overrides = ContextVar('plugin_overrides', default=defaultdict(list))
plugin_pps = ContextVar('plugin_pps', default={})