diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-30 03:21:35 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2023-07-30 03:23:13 +0530 |
commit | 8cb7fc44db010e965d808ee679ef0725cb6e147c (patch) | |
tree | 60caf8ea31a4108a112520e742be4810f3321155 /yt_dlp/YoutubeDL.py | |
parent | 3f7965105d8d2048359e67c1e8b8ebd51588143b (diff) | |
download | hypervideo-pre-8cb7fc44db010e965d808ee679ef0725cb6e147c.tar.lz hypervideo-pre-8cb7fc44db010e965d808ee679ef0725cb6e147c.tar.xz hypervideo-pre-8cb7fc44db010e965d808ee679ef0725cb6e147c.zip |
Fix `--check-formats`
Bug in bc344cd456380999c1ee74554dfd432a38f32ec7
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index c9cf07e53..6e8be40ba 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2339,13 +2339,13 @@ class YoutubeDL: return new_dict def _check_formats(formats): - if (self.params.get('check_formats') is not None + if self.params.get('check_formats') == 'selected': + yield from self._check_formats(formats) + return + elif (self.params.get('check_formats') is not None or self.params.get('allow_unplayable_formats')): yield from formats return - elif self.params.get('check_formats') == 'selected': - yield from self._check_formats(formats) - return for f in formats: if f.get('has_drm'): |