[ChangeLog] Actualize
[youtube-dl] / youtube_dl / postprocessor / common.py
index bee64c45772ed545e925c831637c39fcf001ea18..599dd1df2b2fa16b05548ef847d41b3d6d7c9560 100644 (file)
@@ -4,6 +4,7 @@ import os
 
 from ..utils import (
     PostProcessingError,
+    cli_configuration_args,
     encodeFilename,
 )
 
@@ -22,14 +23,15 @@ 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
-    --postprocessor-args.
+    to InfoExtractor objects.
+
+    Optionally PostProcessor can use a list of additional command-line arguments
+    with self._configuration_args.
     """
 
     _downloader = None
 
     def __init__(self, downloader=None):
-        self._extra_cmd_args = downloader.params.get('postprocessor_args')
         self._downloader = downloader
 
     def set_downloader(self, downloader):
@@ -59,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