Don't check broken formats twice

This commit is contained in:
sepro 2024-05-04 15:22:20 +02:00
parent 80b7cd374d
commit f230093e0a

View file

@ -2136,7 +2136,9 @@ def _filter(f):
def _check_formats(self, formats):
for f in formats:
if f.get('__working'):
working = f.get('__working')
if working is not None:
if working:
yield f
continue
self.to_screen('[info] Testing format %s' % f['format_id'])
@ -2155,8 +2157,8 @@ def _check_formats(self, formats):
os.remove(temp_file.name)
except OSError:
self.report_warning('Unable to delete temporary file "%s"' % temp_file.name)
f['__working'] = success
if success:
f['__working'] = True
yield f
else:
self.to_screen('[info] Unable to download format %s. Skipping...' % f['format_id'])