aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/common.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
committerJesús <heckyel@hyperbola.info>2022-02-18 16:58:38 -0500
commitc7a54bcfbd27dde89c6267b42da7de8ea5625be1 (patch)
tree671b2b7ffe3f976952836dbfe6ee53bf33971e3a /yt_dlp/postprocessor/common.py
parentb6d1ccad21d790c38605be2966ad17e92f1186d7 (diff)
parented66a17ef0b18159dda901f0122520c25ea95d6b (diff)
downloadhypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.lz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.tar.xz
hypervideo-pre-c7a54bcfbd27dde89c6267b42da7de8ea5625be1.zip
updated from upstream | 18/02/2022 at 16:58
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'