1
0
Fork 0

[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
commit 3ae5e79774
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
11 changed files with 94 additions and 48 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: