mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[mdr] Use centralized format selection
This commit is contained in:
parent
c7deaa4c74
commit
b874fe2da8
@ -52,10 +52,11 @@ def _real_extract(self, url):
|
|||||||
'format_id': u'%s-%d' % (media_type, vbr),
|
'format_id': u'%s-%d' % (media_type, vbr),
|
||||||
})
|
})
|
||||||
formats.append(format)
|
formats.append(format)
|
||||||
formats.sort(key=lambda f: (f.get('vbr'), f['abr']))
|
|
||||||
if not formats:
|
if not formats:
|
||||||
raise ExtractorError(u'Could not find any valid formats')
|
raise ExtractorError(u'Could not find any valid formats')
|
||||||
|
|
||||||
|
self._sort_formats(formats)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
Loading…
Reference in New Issue
Block a user