mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 17:41:01 +01:00
[extractor/common] Restrict checks when auto calculating tbr
This commit is contained in:
parent
68a0ea15b4
commit
350cf045d8
@ -828,7 +828,7 @@ def _sort_formats(self, formats, field_preference=None):
|
|||||||
for f in formats:
|
for f in formats:
|
||||||
# Automatically determine tbr when missing based on abr and vbr (improves
|
# Automatically determine tbr when missing based on abr and vbr (improves
|
||||||
# formats sorting in some cases)
|
# formats sorting in some cases)
|
||||||
if 'tbr' not in f and 'abr' in f and 'vbr' in f:
|
if 'tbr' not in f and f.get('abr') is not None and f.get('vbr') is not None:
|
||||||
f['tbr'] = f['abr'] + f['vbr']
|
f['tbr'] = f['abr'] + f['vbr']
|
||||||
|
|
||||||
def _formats_key(f):
|
def _formats_key(f):
|
||||||
|
Loading…
Reference in New Issue
Block a user