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

Update yt_dlp/plugins.py

Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
coletdjnz 2025-02-11 20:11:03 +13:00 committed by GitHub
parent 7b31c53f47
commit 35c779db73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -261,7 +261,7 @@ def register_plugin_spec(plugin_spec: PluginSpec):
def clear_plugins():
if (
all_plugins_loaded.value
or any(len(plugin_spec.plugin_destination.value) != 0 for plugin_spec in plugin_specs.value.values())
or any(plugin_spec.plugin_destination.value for plugin_spec in plugin_specs.value.values())
):
# note: we can't detect all cases when plugins are loaded (e.g. if spec isn't registered)
raise YoutubeDLError('Plugins have already been loaded. Cannot clear plugins after loading plugins.')