Browse Source

[twitch] Prefer source format (closes #20850)

master
Sergey M․ 6 years ago
parent
commit
60e67c5b2c
No known key found for this signature in database GPG Key ID: 2C393E0F18A9236D
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      youtube_dl/extractor/twitch.py

+ 2
- 2
youtube_dl/extractor/twitch.py View File

@ -134,12 +134,12 @@ 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:
for f in formats:
if '/chunked/' in f['url']:
f.update({
'source_preference': 10,
'quality': 10,
'format_note': 'Source',
})
self._sort_formats(formats)


Loading…
Cancel
Save