mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-01-07 17:16:08 +00:00
[twitch] Add new source format detection approach (closes #19193)
This commit is contained in:
parent
7d8b89163c
commit
985637cbbf
|
@ -136,7 +136,12 @@ class TwitchBaseIE(InfoExtractor):
|
||||||
source = next(f for f in formats if f['format_id'] == 'Source')
|
source = next(f for f in formats if f['format_id'] == 'Source')
|
||||||
source['preference'] = 10
|
source['preference'] = 10
|
||||||
except StopIteration:
|
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)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue