]> Raphaƫl G. Git Repositories - youtubedl/blobdiff - youtube_dl/extractor/twitch.py
New upstream version 2019.07.02
[youtubedl] / youtube_dl / extractor / twitch.py
index 401615683dc9b22e4110a6db06dd959c524d96f9..dc5ff29c3f20545c30ad2b185305e4731774849c 100644 (file)
@@ -134,9 +134,14 @@ class TwitchBaseIE(InfoExtractor):
     def _prefer_source(self, formats):
         try:
             source = next(f for f in formats if f['format_id'] == 'Source')
-            source['preference'] = 10
+            source['quality'] = 10
         except StopIteration:
-            pass  # No Source stream present
+            for f in formats:
+                if '/chunked/' in f['url']:
+                    f.update({
+                        'quality': 10,
+                        'format_note': 'Source',
+                    })
         self._sort_formats(formats)