A feature-rich command-line audio/video downloader
[brightcove] Set the filesize of the formats and use _sort_formats
Jaime Marquínez Ferrándiz35eacd0dae3b
diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.pyindex acf8b2dc2e..419951b627 100644--- a/youtube_dl/extractor/brightcove.py+++ b/youtube_dl/extractor/brightcove.py@@ -235,7 +235,6 @@ class BrightcoveIE(InfoExtractor):renditions = video_info.get('renditions')if renditions:- renditions = sorted(renditions, key=lambda r: r['size'])formats = []for rend in renditions:url = rend['defaultURL']@@ -246,12 +245,15 @@ class BrightcoveIE(InfoExtractor):ext = 'flv'else:ext = determine_ext(url)+ size = rend.get('size')formats.append({'url': url,'ext': ext,'height': rend.get('frameHeight'),'width': rend.get('frameWidth'),+ 'filesize': size if size != 0 else None,})+ self._sort_formats(formats)info['formats'] = formatselif video_info.get('FLVFullLengthURL') is not None:info.update({