Browse Source

[mdr] Use centralized format selection

totalwebcasting
Philipp Hagemeister 11 years ago
parent
commit
b874fe2da8
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      youtube_dl/extractor/mdr.py

+ 2
- 1
youtube_dl/extractor/mdr.py View File

@ -52,10 +52,11 @@ class MDRIE(InfoExtractor):
'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…
Cancel
Save