projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d8b891
)
[twitch] Add new source format detection approach (closes #19193)
author
Sergey M․
<dstftw@gmail.com>
Mon, 11 Feb 2019 17:13:50 +0000
(
00:13
+0700)
committer
Sergey M․
<dstftw@gmail.com>
Mon, 11 Feb 2019 17:13:50 +0000
(
00:13
+0700)
youtube_dl/extractor/twitch.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/twitch.py
b/youtube_dl/extractor/twitch.py
index 401615683dc9b22e4110a6db06dd959c524d96f9..8c87f6dd3bfde87fdb8d27935298a45f2861db47 100644
(file)
--- a/
youtube_dl/extractor/twitch.py
+++ b/
youtube_dl/extractor/twitch.py
@@
-136,7
+136,12
@@
class TwitchBaseIE(InfoExtractor):
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)