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

31 lines
806 B
Python
Raw Normal View History

2023-01-07 01:19:13 -06:00
from collections import defaultdict
2025-02-06 17:14:18 -06:00
# 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.
2024-12-07 18:45:21 -06:00
2023-01-07 01:19:13 -06:00
2024-11-29 17:57:30 -06:00
class Indirect:
def __init__(self, initial, /):
self.value = initial
def __repr__(self, /):
return f'{type(self).__name__}({self.value!r})'
postprocessors = Indirect({})
extractors = Indirect({})
2024-12-07 18:45:21 -06:00
2024-10-19 17:59:29 -05:00
# Plugins
2024-11-29 17:57:30 -06:00
all_plugins_loaded = Indirect(False)
2025-02-06 17:14:18 -06:00
plugin_specs = Indirect({})
plugin_dirs = Indirect(['default'])
2025-02-06 17:14:18 -06:00
2024-11-29 17:57:30 -06:00
plugin_ies = Indirect({})
plugin_pps = Indirect({})
2025-02-06 17:14:18 -06:00
plugin_ies_overrides = Indirect(defaultdict(list))
# Misc
IN_CLI = Indirect(False)
LAZY_EXTRACTORS = Indirect(False) # `False`=force, `None`=disabled, `True`=enabled