diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-03-08 18:09:47 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-03-08 18:09:47 +0600 |
commit | 11101076a1b0eb36dd56b1b5aa1b7559f2d230b9 (patch) | |
tree | 76d16fdef235ce95e7d877c1b75e81c8fef1d205 /youtube_dl/extractor/pladform.py | |
parent | f8388757269de8a5e87b9a507db55021b3090980 (diff) |
[pladform] Fix format quality sorting
Diffstat (limited to 'youtube_dl/extractor/pladform.py')
-rw-r--r-- | youtube_dl/extractor/pladform.py | 4 |
1 files changed, 4 insertions, 0 deletions
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) |