aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/dreisat.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-24 12:35:02 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-24 12:35:08 +0100
commit55e663a8d73b38922599e7414e24a2620d5763ce (patch)
tree5ba22901f795a66c0a629f78afae6b9f31031fae /youtube_dl/extractor/dreisat.py
parent2c62dc26c82bfd07a00e6775f6558d1dde7e088a (diff)
[dreisat] Use centralized format sorting
Diffstat (limited to 'youtube_dl/extractor/dreisat.py')
-rw-r--r--youtube_dl/extractor/dreisat.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/youtube_dl/extractor/dreisat.py b/youtube_dl/extractor/dreisat.py
index cb7226f82..f141c850d 100644
--- a/youtube_dl/extractor/dreisat.py
+++ b/youtube_dl/extractor/dreisat.py
@@ -52,18 +52,12 @@ class DreiSatIE(InfoExtractor):
'width': int(fe.find('./width').text),
'height': int(fe.find('./height').text),
'url': fe.find('./url').text,
- 'ext': determine_ext(fe.find('./url').text),
'filesize': int(fe.find('./filesize').text),
'video_bitrate': int(fe.find('./videoBitrate').text),
- '3sat_qualityname': fe.find('./quality').text,
} for fe in format_els
if not fe.find('./url').text.startswith('http://www.metafilegenerator.de/')]
- def _sortkey(format):
- qidx = ['low', 'med', 'high', 'veryhigh'].index(format['3sat_qualityname'])
- prefer_http = 1 if 'rtmp' in format['url'] else 0
- return (qidx, prefer_http, format['video_bitrate'])
- formats.sort(key=_sortkey)
+ self._sort_formats(formats)
return {
'_type': 'video',