X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fpostprocessor%2Fcommon.py;h=599dd1df2b2fa16b05548ef847d41b3d6d7c9560;hb=6cd452acffe8d79c895a2ebd0346e2ba7f9e112f;hp=d944d9367a96055a228276b94a78fdb9d00784ea;hpb=14835de9fb41798c8e6e731a3f07ae871770666f;p=youtube-dl diff --git a/youtube_dl/postprocessor/common.py b/youtube_dl/postprocessor/common.py index d944d9367..599dd1df2 100644 --- a/youtube_dl/postprocessor/common.py +++ b/youtube_dl/postprocessor/common.py @@ -4,6 +4,7 @@ import os from ..utils import ( PostProcessingError, + cli_configuration_args, encodeFilename, ) @@ -22,8 +23,10 @@ class PostProcessor(object): of the chain is reached. PostProcessor objects follow a "mutual registration" process similar - to InfoExtractor objects. And it can receive parameters from CLI trough - --pp-params. + to InfoExtractor objects. + + Optionally PostProcessor can use a list of additional command-line arguments + with self._configuration_args. """ _downloader = None @@ -58,6 +61,9 @@ class PostProcessor(object): except Exception: self._downloader.report_warning(errnote) + def _configuration_args(self, default=[]): + return cli_configuration_args(self._downloader.params, 'postprocessor_args', default) + class AudioConversionError(PostProcessingError): pass