Fix `--check-formats`

Bug in bc344cd456
pull/7661/merge
pukkandan 2023-07-30 03:21:35 +05:30
rodzic 3f7965105d
commit 8cb7fc44db
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7EEE9E1E817D0A39
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

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