[YoutubeDL] Make postprocessors declarative
Instead of having to configure PPs in code, this allows us and embedding programs not to worry about imports or finer details, similarly to how we handle IEs.
This commit is contained in:
@ -8,11 +8,16 @@ from .ffmpeg import (
|
||||
FFmpegExtractAudioPP,
|
||||
FFmpegMergerPP,
|
||||
FFmpegMetadataPP,
|
||||
FFmpegVideoConvertor,
|
||||
FFmpegVideoConvertorPP,
|
||||
)
|
||||
from .xattrpp import XAttrMetadataPP
|
||||
from .execafterdownload import ExecAfterDownloadPP
|
||||
|
||||
|
||||
def get_postprocessor(key):
|
||||
return globals()[key + 'PP']
|
||||
|
||||
|
||||
__all__ = [
|
||||
'AtomicParsleyPP',
|
||||
'ExecAfterDownloadPP',
|
||||
@ -22,6 +27,6 @@ __all__ = [
|
||||
'FFmpegMergerPP',
|
||||
'FFmpegMetadataPP',
|
||||
'FFmpegPostProcessor',
|
||||
'FFmpegVideoConvertor',
|
||||
'FFmpegVideoConvertorPP',
|
||||
'XAttrMetadataPP',
|
||||
]
|
||||
|
Reference in New Issue
Block a user