mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-17 08:24:01 +01:00
[twitch] Prefer source format (closes #20850)
This commit is contained in:
parent
eefa0f2157
commit
60e67c5b2c
@ -134,12 +134,12 @@ def login_step(page, urlh, note, data):
|
||||
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:
|
||||
for f in formats:
|
||||
if '/chunked/' in f['url']:
|
||||
f.update({
|
||||
'source_preference': 10,
|
||||
'quality': 10,
|
||||
'format_note': 'Source',
|
||||
})
|
||||
self._sort_formats(formats)
|
||||
|
Loading…
Reference in New Issue
Block a user