From d48d00d064ca2dec82b727fc8bd1eeac4eecc61e Mon Sep 17 00:00:00 2001 From: coletdjnz Date: Sat, 30 Nov 2024 13:52:09 +1300 Subject: [PATCH] Fix no-external --- yt_dlp/__init__.py | 2 ++ yt_dlp/plugins.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 394d3b6a7..a05e19006 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -433,6 +433,8 @@ def validate_options(opts): opts.plugin_dirs = opts.plugin_dirs or [] if 'no-external' not in opts.plugin_dirs: opts.plugin_dirs.append('external') + else: + opts.plugin_dirs.remove('no-external') if opts.playlist_items is not None: try: diff --git a/yt_dlp/plugins.py b/yt_dlp/plugins.py index 13e9ad671..baeafeba7 100644 --- a/yt_dlp/plugins.py +++ b/yt_dlp/plugins.py @@ -169,7 +169,7 @@ class PluginFinder(importlib.abc.MetaPathFinder): def directories(): spec = importlib.util.find_spec(PACKAGE_NAME) - return spec.submodule_search_locations if spec else [] + return list(spec.submodule_search_locations) if spec else [] def iter_modules(subpackage):