mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-21 17:51:51 +00:00
Allow passing postprocessor class directly
This makes it possible to create custom postprocessors easily
This commit is contained in:
parent
27d8e089a2
commit
7e3cbdeac1
1 changed files with 3 additions and 2 deletions
|
@ -16,12 +16,13 @@ from .ffmpeg import (
|
|||
from .xattrpp import XAttrMetadataPP
|
||||
from .execafterdownload import ExecAfterDownloadPP
|
||||
from .metadatafromtitle import MetadataFromTitlePP
|
||||
|
||||
from .common import PostProcessor
|
||||
|
||||
def get_postprocessor(key):
|
||||
if isinstance(key, PostProcessor):
|
||||
return key
|
||||
return globals()[key + 'PP']
|
||||
|
||||
|
||||
__all__ = [
|
||||
'EmbedThumbnailPP',
|
||||
'ExecAfterDownloadPP',
|
||||
|
|
Loading…
Reference in a new issue