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

@ -123,7 +123,7 @@ from .extractor import (
gen_extractor_classes,
get_info_extractor,
_LAZY_LOADER,
_PLUGIN_CLASSES
_PLUGIN_CLASSES as plugin_extractors
)
from .extractor.openload import PhantomJSwrapper
from .downloader import (
@ -142,6 +142,7 @@ from .postprocessor import (
FFmpegMergerPP,
FFmpegPostProcessor,
MoveFilesAfterDownloadPP,
_PLUGIN_CLASSES as plugin_postprocessors
)
from .update import detect_variant
from .version import __version__
@ -3201,9 +3202,10 @@ class YoutubeDL(object):
self._write_string('[debug] yt-dlp version %s%s\n' % (__version__, '' if source == 'unknown' else f' ({source})'))
if _LAZY_LOADER:
self._write_string('[debug] Lazy loading extractors enabled\n')
if _PLUGIN_CLASSES:
self._write_string(
'[debug] Plugin Extractors: %s\n' % [ie.ie_key() for ie in _PLUGIN_CLASSES])
if plugin_extractors or plugin_postprocessors:
self._write_string('[debug] Plugins: %s\n' % [
'%s%s' % (klass.__name__, '' if klass.__name__ == name else f' as {name}')
for name, klass in itertools.chain(plugin_extractors.items(), plugin_postprocessors.items())])
if self.params.get('compat_opts'):
self._write_string(
'[debug] Compatibility options: %s\n' % ', '.join(self.params.get('compat_opts')))