From cb9e38a797116255480cc477bfd0c35527a83be3 Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sat, 19 Oct 2024 16:40:16 +1300 Subject: [PATCH] Fix reloading --- yt_dlp/_globals.py | 1 + yt_dlp/plugins.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/yt_dlp/_globals.py b/yt_dlp/_globals.py index c91f07eca..da0095425 100644 --- a/yt_dlp/_globals.py +++ b/yt_dlp/_globals.py @@ -9,6 +9,7 @@ IN_CLI = ContextVar('IN_CLI', default=False) # `False`=force, `None`=disabled, `True`=enabled LAZY_EXTRACTORS = ContextVar('LAZY_EXTRACTORS', default=False) +# `...`=search default plugin dirs plugin_dirs = ContextVar('plugin_dirs', default=(..., )) plugin_ies = ContextVar('plugin_ies', default={}) plugin_overrides = ContextVar('plugin_overrides', default=defaultdict(list)) diff --git a/yt_dlp/plugins.py b/yt_dlp/plugins.py index a9e7b08b3..a32929ccc 100644 --- a/yt_dlp/plugins.py +++ b/yt_dlp/plugins.py @@ -289,7 +289,7 @@ def load_plugins(plugin_type: PluginType): # Add the classes into the global plugin lookup for that type plugin_config.plugin_destination.set(regular_classes) # We want to prepend to the main lookup for that type - plugin_config.destination.set(merge_dicts(plugin_config.destination.get(), regular_classes)) + plugin_config.destination.set(merge_dicts(regular_classes, plugin_config.destination.get())) return regular_classes