mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-23 02:25:11 +00:00
[postprocessor/common] Use generalized cli option converters
This commit is contained in:
parent
1195a38f46
commit
6270239a6d
1 changed files with 2 additions and 5 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
from ..utils import (
|
from ..utils import (
|
||||||
PostProcessingError,
|
PostProcessingError,
|
||||||
|
cli_configuration_args,
|
||||||
encodeFilename,
|
encodeFilename,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -61,11 +62,7 @@ def try_utime(self, path, atime, mtime, errnote='Cannot update utime of file'):
|
||||||
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')
|
return cli_configuration_args(self.params, 'postprocessor_args', default)
|
||||||
if pp_args is None:
|
|
||||||
return default
|
|
||||||
assert isinstance(pp_args, list)
|
|
||||||
return pp_args
|
|
||||||
|
|
||||||
|
|
||||||
class AudioConversionError(PostProcessingError):
|
class AudioConversionError(PostProcessingError):
|
||||||
|
|
Loading…
Reference in a new issue