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 metadataparser_actions(f): 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 @@ def invalidate_caches(self): 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):