0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

[twitch] Add new source format detection approach (closes #19193)

This commit is contained in:
Sergey M․ 2019-02-12 00:13:50 +07:00
parent 7d8b89163c
commit 985637cbbf
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D

View file

@ -136,7 +136,12 @@ def _prefer_source(self, formats):
source = next(f for f in formats if f['format_id'] == 'Source')
source['preference'] = 10
except StopIteration:
pass # No Source stream present
for f in formats:
if '/chunked/' in f['url']:
f.update({
'source_preference': 10,
'format_note': 'Source',
})
self._sort_formats(formats)