projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[YoutubeDL] use a more correct terminology in the error message for file:// URLs
[youtube-dl]
/
youtube_dl
/
postprocessor
/
common.py
diff --git
a/youtube_dl/postprocessor/common.py
b/youtube_dl/postprocessor/common.py
index c44501b594c87fc3c82772c0c67ce2c5d27689f8..599dd1df2b2fa16b05548ef847d41b3d6d7c9560 100644
(file)
--- a/
youtube_dl/postprocessor/common.py
+++ b/
youtube_dl/postprocessor/common.py
@@
-1,10
+1,10
@@
from __future__ import unicode_literals
import os
from __future__ import unicode_literals
import os
-import shlex
from ..utils import (
PostProcessingError,
from ..utils import (
PostProcessingError,
+ cli_configuration_args,
encodeFilename,
)
encodeFilename,
)
@@
-23,14
+23,15
@@
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
- --postprocessor-args.
+ to InfoExtractor objects.
+
+ Optionally PostProcessor can use a list of additional command-line arguments
+ with self._configuration_args.
"""
_downloader = None
"""
_downloader = None
- def __init__(self, downloader=None, extra_cmd_args=None):
- self._extra_cmd_args = shlex.split(extra_cmd_args or '')
+ def __init__(self, downloader=None):
self._downloader = downloader
def set_downloader(self, downloader):
self._downloader = downloader
def set_downloader(self, downloader):
@@
-60,6
+61,9
@@
class PostProcessor(object):
except Exception:
self._downloader.report_warning(errnote)
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
class AudioConversionError(PostProcessingError):
pass