'height': height,
'format_note': note,
})
- def _formats_key(f):
- return (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 = sorted(formats, key=_formats_key)
+
+ self._sort_formats(formats)
return {
'id': video_id,