mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-10-03 23:43:21 -04:00
Allow passing different arguments to different postprocessors
* Also deprecated --sponskrub-args Closes: https://github.com/ytdl-org/youtube-dl/issues/27593 Eg: `--postprocessor-args "VideoConvertor:-c:v h264_nvenc -preset slow"` Eg: `--postprocessor-args "SponsKrub:-include-selfpromo"` For backward compatibility, `--postprocessor-args args` is equivalent to: `--post-processor-args "sponskrub:" --post-processor-args "default:args"`
This commit is contained in:
@@ -35,14 +35,10 @@ class MetadataFromTitlePP(PostProcessor):
|
||||
title = info['title']
|
||||
match = re.match(self._titleregex, title)
|
||||
if match is None:
|
||||
self._downloader.to_screen(
|
||||
'[fromtitle] Could not interpret title of video as "%s"'
|
||||
% self._titleformat)
|
||||
self.to_screen('Could not interpret title of video as "%s"' % self._titleformat)
|
||||
return [], info
|
||||
for attribute, value in match.groupdict().items():
|
||||
info[attribute] = value
|
||||
self._downloader.to_screen(
|
||||
'[fromtitle] parsed %s: %s'
|
||||
% (attribute, value if value is not None else 'NA'))
|
||||
self.to_screen('parsed %s: %s' % (attribute, value if value is not None else 'NA'))
|
||||
|
||||
return [], info
|
||||
|
Reference in New Issue
Block a user