X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fbrightcove.py;h=419951b6279ae87fb8f0dab1c4f5249ce221a268;hb=5ecd7b0a922a07fb74bd32ac1b55cfd73181849c;hp=acf8b2dc2ee13b0b3487a807f62e236fcde8e867;hpb=96bef88f5f0eea0b2c5410a6cbb65cc820d72b30;p=youtube-dl diff --git a/youtube_dl/extractor/brightcove.py b/youtube_dl/extractor/brightcove.py index acf8b2dc2..419951b62 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'] = formats elif video_info.get('FLVFullLengthURL') is not None: info.update({