[mdr] Use centralized format selection
authorPhilipp Hagemeister <phihag@phihag.de>
Tue, 24 Dec 2013 22:34:11 +0000 (23:34 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Tue, 24 Dec 2013 22:34:11 +0000 (23:34 +0100)
youtube_dl/extractor/mdr.py

index 08ce0647f93e69ab34187ef08926d89a9de458b4..7aa0080d735fe811d6babf110156f4ab895edbdd 100644 (file)
@@ -52,10 +52,11 @@ class MDRIE(InfoExtractor):
                     'format_id': u'%s-%d' % (media_type, vbr),
                 })
             formats.append(format)
-        formats.sort(key=lambda f: (f.get('vbr'), f['abr']))
         if not formats:
             raise ExtractorError(u'Could not find any valid formats')
 
+        self._sort_formats(formats)
+
         return {
             'id': video_id,
             'title': title,