about summary refs log tree commit diff
path: root/youtube_dl/extractor/lynda.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-10-18 01:36:03 +0600
committerSergey M․ <dstftw@gmail.com>2015-10-18 01:36:03 +0600
commit5a11b793fe70beb6b0c7a74a489db9e52c4a742b (patch)
treea3d7fccb8d806ad40d14faa3dfa39704c3c38627 /youtube_dl/extractor/lynda.py
parent7593fbaa126f8bf14eecff7f103cb497e3d31de5 (diff)
downloadyoutube-dl-5a11b793fe70beb6b0c7a74a489db9e52c4a742b.tar.gz
youtube-dl-5a11b793fe70beb6b0c7a74a489db9e52c4a742b.tar.xz
youtube-dl-5a11b793fe70beb6b0c7a74a489db9e52c4a742b.zip
[lynda] Extract all prioritized streams
Diffstat (limited to 'youtube_dl/extractor/lynda.py')
-rw-r--r--youtube_dl/extractor/lynda.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/youtube_dl/extractor/lynda.py b/youtube_dl/extractor/lynda.py
index 378117270..5c973e75c 100644
--- a/youtube_dl/extractor/lynda.py
+++ b/youtube_dl/extractor/lynda.py
@@ -140,13 +140,14 @@ class LyndaIE(LyndaBaseIE):
 
         prioritized_streams = video_json.get('PrioritizedStreams')
         if prioritized_streams:
-            formats.extend([
-                {
-                    'url': video_url,
-                    'width': int_or_none(format_id),
-                    'format_id': format_id,
-                } for format_id, video_url in prioritized_streams['0'].items()
-            ])
+            for prioritized_stream_id, prioritized_stream in prioritized_streams.items():
+                formats.extend([
+                    {
+                        'url': video_url,
+                        'width': int_or_none(format_id),
+                        'format_id': '%s-%s' % (prioritized_stream_id, format_id),
+                    } for format_id, video_url in prioritized_stream.items()
+                ])
 
         self._check_formats(formats, video_id)
         self._sort_formats(formats)