mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-11-24 07:40:24 +01:00
Allow passing postprocessor class directly
This makes it possible to create custom postprocessors easily
This commit is contained in:
parent
27d8e089a2
commit
7e3cbdeac1
@ -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 New Issue
Block a user