1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-25 11:41:52 +00:00

Allow passing postprocessor class directly

This makes it possible to create custom postprocessors easily
This commit is contained in:
Samadi van Koten 2018-09-02 12:21:50 +01:00 committed by GitHub
parent 27d8e089a2
commit 7e3cbdeac1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,12 +16,13 @@ from .ffmpeg import (
from .xattrpp import XAttrMetadataPP from .xattrpp import XAttrMetadataPP
from .execafterdownload import ExecAfterDownloadPP from .execafterdownload import ExecAfterDownloadPP
from .metadatafromtitle import MetadataFromTitlePP from .metadatafromtitle import MetadataFromTitlePP
from .common import PostProcessor
def get_postprocessor(key): def get_postprocessor(key):
if isinstance(key, PostProcessor):
return key
return globals()[key + 'PP'] return globals()[key + 'PP']
__all__ = [ __all__ = [
'EmbedThumbnailPP', 'EmbedThumbnailPP',
'ExecAfterDownloadPP', 'ExecAfterDownloadPP',