projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[utils] import re
[youtube-dl]
/
youtube_dl
/
postprocessor
/
common.py
diff --git
a/youtube_dl/postprocessor/common.py
b/youtube_dl/postprocessor/common.py
index d944d9367a96055a228276b94a78fdb9d00784ea..4191d040bb1da468e248d57b78df1afdacf64cd0 100644
(file)
--- a/
youtube_dl/postprocessor/common.py
+++ b/
youtube_dl/postprocessor/common.py
@@
-22,8
+22,10
@@
class PostProcessor(object):
of the chain is reached.
PostProcessor objects follow a "mutual registration" process similar
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
"""
_downloader = None
@@
-58,6
+60,13
@@
class PostProcessor(object):
except Exception:
self._downloader.report_warning(errnote)
except Exception:
self._downloader.report_warning(errnote)
+ 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
+
class AudioConversionError(PostProcessingError):
pass
class AudioConversionError(PostProcessingError):
pass