[udemy] Use custom sorting
authorSergey M․ <dstftw@gmail.com>
Sat, 26 Mar 2016 17:42:46 +0000 (23:42 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 26 Mar 2016 17:42:46 +0000 (23:42 +0600)
youtube_dl/extractor/udemy.py

index da2d542ec5033d1a776f82c884856f019f7bf5f9..100db4dd02339208c85df55fff0edddbf4403aff 100644 (file)
@@ -279,7 +279,7 @@ class UdemyIE(InfoExtractor):
                         'height': height,
                     })
 
-        self._sort_formats(formats)
+        self._sort_formats(formats, field_preference=('height', 'width', 'tbr', 'format_id'))
 
         return {
             'id': video_id,