Skip to content

Commit

Permalink
[twitch] Add new source format detection approach (closes #19193)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstftw authored and meunierd committed Dec 27, 2019
1 parent 39fbd01 commit b3c99b1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion youtube_dl/extractor/twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit b3c99b1

Please sign in to comment.