diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-24 12:25:22 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-24 12:31:42 +0100 |
commit | 4bcc7bd1f21c479a3ef613e62868a9fe6d9c370f (patch) | |
tree | 06a97cb8f1af463e45ae48652d7ac83a7bd9d9be /youtube_dl/extractor/youtube.py | |
parent | f49d89ee04897b3ec64af74bb9fd94957c42331c (diff) |
Add temporary _sort_formats helper function
Diffstat (limited to 'youtube_dl/extractor/youtube.py')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 55c345e8a..829d84e9b 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1433,16 +1433,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor, SubtitlesInfoExtractor): 'format_note': note, }) - def _formats_key(f): - note = f.get('format_note') - if note is None: - note = u'' - is_dash = u'DASH' in note - return ( - 0 if is_dash else 1, - f.get('height') if f.get('height') is not None else -1, - f.get('width') if f.get('width') is not None else -1) - formats.sort(key=_formats_key) + self._sort_formats(formats) return { 'id': video_id, |