1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-28 01:20:57 +01: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 .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',