From: Sergey M․ Date: Sun, 8 Mar 2015 12:09:47 +0000 (+0600) Subject: [pladform] Fix format quality sorting X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=11101076a1b0eb36dd56b1b5aa1b7559f2d230b9;p=youtube-dl [pladform] Fix format quality sorting --- diff --git a/youtube_dl/extractor/pladform.py b/youtube_dl/extractor/pladform.py index 926e368a2..abde34b94 100644 --- a/youtube_dl/extractor/pladform.py +++ b/youtube_dl/extractor/pladform.py @@ -6,6 +6,7 @@ from ..utils import ( ExtractorError, int_or_none, xpath_text, + qualities, ) @@ -55,9 +56,12 @@ class PladformIE(InfoExtractor): '%s returned error: %s' % (self.IE_NAME, video.text), expected=True) + quality = qualities(('ld', 'sd', 'hd')) + formats = [{ 'url': src.text, 'format_id': src.get('quality'), + 'quality': quality(src.get('quality')), } for src in video.findall('./src')] self._sort_formats(formats)