소스 검색

[postprocessor/common] Use generalized cli option converters

Sergey M․ 10 년 전
부모
커밋
6270239a6d
1개의 변경된 파일2개의 추가작업 그리고 5개의 파일을 삭제
  1. 2 5
      youtube_dl/postprocessor/common.py

+ 2 - 5
youtube_dl/postprocessor/common.py

@@ -4,6 +4,7 @@ import os
 
 
 from ..utils import (
 from ..utils import (
     PostProcessingError,
     PostProcessingError,
+    cli_configuration_args,
     encodeFilename,
     encodeFilename,
 )
 )
 
 
@@ -61,11 +62,7 @@ class PostProcessor(object):
             self._downloader.report_warning(errnote)
             self._downloader.report_warning(errnote)
 
 
     def _configuration_args(self, default=[]):
     def _configuration_args(self, default=[]):
-        pp_args = self._downloader.params.get('postprocessor_args')
-        if pp_args is None:
-            return default
-        assert isinstance(pp_args, list)
-        return pp_args
+        return cli_configuration_args(self.params, 'postprocessor_args', default)
 
 
 
 
 class AudioConversionError(PostProcessingError):
 class AudioConversionError(PostProcessingError):