[ARDIE] fix formats extraction (fixes #3087)
authorpulpe <Pulpan3@gmail.com>
Mon, 16 Jun 2014 14:17:49 +0000 (16:17 +0200)
committerpulpe <Pulpan3@gmail.com>
Mon, 16 Jun 2014 14:17:49 +0000 (16:17 +0200)
youtube_dl/extractor/ard.py

index c6d22c029ef1c8dcdef44df172fe3e9391fea6eb..de8811f236cea2630c06bb0fee1f742fb6a64f3e 100644 (file)
@@ -56,7 +56,19 @@ class ARDIE(InfoExtractor):
                 raise ExtractorError('This video is only available after 20:00')
 
         formats = []
+
         for s in streams:
+            if type(s['_stream']) == list:
+                reverse = s['_stream'][::-1]
+                for i in reverse:
+                    quality = s['_quality'] + reverse.index(i)
+                    formats.append({
+                        'quality': quality,
+                        'url': i,
+                        'format_id': '%s-%s' % (determine_ext(i), quality)
+                        })
+                continue
+
             format = {
                 'quality': s['_quality'],
                 'url': s['_stream'],