diff options
Diffstat (limited to 'yt_dlp/postprocessor/execafterdownload.py')
-rw-r--r-- | yt_dlp/postprocessor/execafterdownload.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/postprocessor/execafterdownload.py b/yt_dlp/postprocessor/execafterdownload.py index 948b3ffb3..336671d14 100644 --- a/yt_dlp/postprocessor/execafterdownload.py +++ b/yt_dlp/postprocessor/execafterdownload.py @@ -28,7 +28,8 @@ class ExecAfterDownloadPP(PostProcessor): # If no replacements are found, replace {} for backard compatibility if '{}' not in cmd: cmd += ' {}' - return cmd.replace('{}', compat_shlex_quote(info['filepath'])) + return cmd.replace('{}', compat_shlex_quote( + info.get('filepath') or info['_filename'])) def run(self, info): cmd = self.parse_cmd(self.exec_cmd, info) |