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'):