Skip to content

Commit

Permalink
Fix --check-formats
Browse files Browse the repository at this point in the history
Bug in bc344cd
  • Loading branch information
pukkandan committed Jul 29, 2023
1 parent 3f79651 commit 8cb7fc4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -2339,13 +2339,13 @@ def _merge(formats_pair):
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'):
Expand Down

0 comments on commit 8cb7fc4

Please sign in to comment.