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:
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 .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',
|
||||||
|
|
Loading…
Reference in a new issue