[youtube] Minor improvement to format sorting

This commit is contained in:
pukkandan 2021-11-13 15:11:59 +05:30
parent 39c04074e7
commit e339d25a0d
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698
1 changed files with 1 additions and 1 deletions

View File

@ -2563,7 +2563,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
f['quality'] = next((
q(qdict[val])
for val, qdict in ((f.get('format_id'), itag_qualities), (f.get('height'), res_qualities))
for val, qdict in ((f.get('format_id', '').split('-')[0], itag_qualities), (f.get('height'), res_qualities))
if val in qdict), -1)
return True