A feature-rich command-line audio/video downloader
Fix `--check-formats`
pukkandan8cb7fc44db01
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.pyindex c9cf07e530..6e8be40ba2 100644--- a/yt_dlp/YoutubeDL.py+++ b/yt_dlp/YoutubeDL.py@@ -2339,13 +2339,13 @@ class YoutubeDL:return new_dictdef _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 Noneor self.params.get('allow_unplayable_formats')):yield from formatsreturn- elif self.params.get('check_formats') == 'selected':- yield from self._check_formats(formats)- returnfor f in formats:if f.get('has_drm'):