1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2025-01-10 07:07:55 +01:00

[AnimeLab] Use _sort_formats

This commit is contained in:
Mariusz Skoneczko 2017-07-09 13:34:50 +10:00
parent 330768e7b5
commit 9b9ecee63b

View File

@ -131,11 +131,7 @@ class AnimeLabBaseIE(InfoExtractor):
formats.append(current_format) formats.append(current_format)
# due to Python's sorting algorithm having the property of being 'stable', the following self._sort_formats(formats)
# means that videos are sorted by height, but in the case of the same height,
# are sorted by language
formats.sort(key=lambda k: str.lower(k.get('language') or ''))
formats.sort(key=lambda k: k.get('height') or 0)
return formats return formats