1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00
yt-dlp/yt_dlp/_globals.py

24 lines
813 B
Python
Raw Normal View History

2023-01-07 01:19:13 -06:00
from collections import defaultdict
from contextvars import ContextVar
2024-10-18 22:25:36 -05:00
# Internal only - no backwards compatibility guaranteed
2023-01-07 01:19:13 -06:00
postprocessors = ContextVar('postprocessors', default={})
extractors = ContextVar('extractors', default={})
IN_CLI = ContextVar('IN_CLI', default=False)
# `False`=force, `None`=disabled, `True`=enabled
2023-01-15 21:53:41 -06:00
LAZY_EXTRACTORS = ContextVar('LAZY_EXTRACTORS', default=False)
2023-01-07 01:19:13 -06:00
2024-10-19 17:59:29 -05:00
# Plugins
plugin_specs = ContextVar('plugin_specs', default={})
# Whether plugins have been loaded once
2024-10-19 17:59:29 -05:00
all_plugins_loaded = ContextVar('all_plugins_loaded', default=False)
plugin_dirs = ContextVar('plugin_dirs', default=('external', ))
2023-01-07 01:19:13 -06:00
plugin_ies = ContextVar('plugin_ies', default={})
plugin_overrides = ContextVar('plugin_overrides', default=defaultdict(list))
plugin_pps = ContextVar('plugin_pps', default={})