mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-27 21:27:54 +00:00
Don't check broken formats twice
This commit is contained in:
parent
80b7cd374d
commit
f230093e0a
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue