浏览代码

[vh1] use standard sort (#2072)

Ralf Haring 11 年之前
父节点
当前提交
34d863f3fc
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      youtube_dl/extractor/mtv.py

+ 1 - 2
youtube_dl/extractor/mtv.py

@@ -80,8 +80,7 @@ class MTVServicesInfoExtractor(InfoExtractor):
                                 })
                                 })
             except (KeyError, TypeError):
             except (KeyError, TypeError):
                 raise ExtractorError('Invalid rendition field.')
                 raise ExtractorError('Invalid rendition field.')
-        # worst format is expected to be first and best one last
-        formats.sort(key=lambda x: int(x['format_id']))
+        self._sort_formats(formats)
         return formats
         return formats
 
 
     def _get_video_info(self, itemdoc):
     def _get_video_info(self, itemdoc):