1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 14:45:14 +00:00

[postprocessor] Add plugin support

Adds option `--use-postprocessor` to enable them
This commit is contained in:
pukkandan
2021-09-30 02:23:33 +05:30
parent 8e3fd7e034
commit 3ae5e79774
11 changed files with 95 additions and 49 deletions

View File

@@ -6278,7 +6278,7 @@ def get_executable_path():
def load_plugins(name, suffix, namespace):
plugin_info = [None]
classes = []
classes = {}
try:
plugin_info = imp.find_module(
name, [os.path.join(get_executable_path(), 'ytdlp_plugins')])
@@ -6289,8 +6289,7 @@ def load_plugins(name, suffix, namespace):
if not name.endswith(suffix):
continue
klass = getattr(plugins, name)
classes.append(klass)
namespace[name] = klass
classes[name] = namespace[name] = klass
except ImportError:
pass
finally: