diff --git a/yt_dlp/plugins.py b/yt_dlp/plugins.py index d91ebf2ef..2e88579e1 100644 --- a/yt_dlp/plugins.py +++ b/yt_dlp/plugins.py @@ -158,6 +158,9 @@ def search_locations(self, fullname): write_string(f'Permission error while accessing modules in "{e.filename}"\n') def find_spec(self, fullname, path=None, target=None): + if not plugins_enabled.value: + return None + if fullname not in self.packages: return None