mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-12-16 04:58:56 +00:00
Improved passing of multiple postprocessor-args
* Added `PP+exe:args` syntax
If `PP+exe:args` is specifically given, only it used.
Otherwise, `PP:args` and `exe:args` are combined.
If none of the `PP`, `exe` or `PP+exe` args are given, `default` is used
`Default` is purposely left undocumented since it exists only for backward compatibility
* Also added proper handling of args in `EmbedThumbnail`
Related: https://github.com/ytdl-org/youtube-dl/pull/27723
This commit is contained in:
@@ -11,12 +11,15 @@ from ..utils import (
|
||||
|
||||
|
||||
class ExecAfterDownloadPP(PostProcessor):
|
||||
PP_NAME = 'Exec'
|
||||
|
||||
def __init__(self, downloader, exec_cmd):
|
||||
super(ExecAfterDownloadPP, self).__init__(downloader)
|
||||
self.exec_cmd = exec_cmd
|
||||
|
||||
@classmethod
|
||||
def pp_key(cls):
|
||||
return 'Exec'
|
||||
|
||||
def run(self, information):
|
||||
cmd = self.exec_cmd
|
||||
if '{}' not in cmd:
|
||||
|
||||
Reference in New Issue
Block a user