aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/common.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-02-18 23:16:16 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-02-18 23:17:37 +0530
commited66a17ef0b18159dda901f0122520c25ea95d6b (patch)
tree9ede046d0c8bd9eb5d0a9ff4c70fafd62313eec7 /yt_dlp/postprocessor/common.py
parent5625e6073fc9bd0ca944eaa18b1038ca8eddabd7 (diff)
downloadhypervideo-pre-ed66a17ef0b18159dda901f0122520c25ea95d6b.tar.lz
hypervideo-pre-ed66a17ef0b18159dda901f0122520c25ea95d6b.tar.xz
hypervideo-pre-ed66a17ef0b18159dda901f0122520c25ea95d6b.zip
[FFmpegConcat] Abort on `--simulate`
Diffstat (limited to 'yt_dlp/postprocessor/common.py')
-rw-r--r--yt_dlp/postprocessor/common.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/yt_dlp/postprocessor/common.py b/yt_dlp/postprocessor/common.py
index f2467c542..d761c9303 100644
--- a/yt_dlp/postprocessor/common.py
+++ b/yt_dlp/postprocessor/common.py
@@ -103,12 +103,14 @@ class PostProcessor(metaclass=PostProcessorMetaClass):
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'