]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/postprocessor/common.py
[FFmpegConcat] Abort on `--simulate`
[yt-dlp.git] / yt_dlp / postprocessor / common.py
index f2467c542303b70b4609251a81ede8963a284cc9..d761c9303b1646b2a06e52876b2d6ceaff27ea15 100644 (file)
@@ -103,12 +103,14 @@ def _copy_infodict(self, info_dict):
         return getattr(self._downloader, '_copy_infodict', dict)(info_dict)
 
     @staticmethod
-    def _restrict_to(*, video=True, audio=True, images=True):
+    def _restrict_to(*, video=True, audio=True, images=True, simulated=True):
         allowed = {'video': video, 'audio': audio, 'images': images}
 
         def decorator(func):
             @functools.wraps(func)
             def wrapper(self, info):
+                if not simulated and (self.get_param('simulate') or self.get_param('skip_download')):
+                    return [], info
                 format_type = (
                     'video' if info.get('vcodec') != 'none'
                     else 'audio' if info.get('acodec') != 'none'