projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8b40c92
)
[vrv] Make format ids deterministic
author
Sergey M․
<dstftw@gmail.com>
Sun, 16 Sep 2018 16:52:27 +0000
(23:52 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 16 Sep 2018 16:54:58 +0000
(23:54 +0700)
youtube_dl/extractor/vrv.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/vrv.py
b/youtube_dl/extractor/vrv.py
index 921e9e172496975a2b7ff78d7f08871b6c27f8f7..ac0819c7c10a9bc0db09b76993a4c79c08a02c4b 100644
(file)
--- a/
youtube_dl/extractor/vrv.py
+++ b/
youtube_dl/extractor/vrv.py
@@
-90,7
+90,13
@@
class VRVIE(VRVBaseIE):
def _extract_vrv_formats(self, url, video_id, stream_format, audio_lang, hardsub_lang):
if not url or stream_format not in ('hls', 'dash'):
return []
def _extract_vrv_formats(self, url, video_id, stream_format, audio_lang, hardsub_lang):
if not url or stream_format not in ('hls', 'dash'):
return []
- stream_id = hardsub_lang or audio_lang
+ assert audio_lang or hardsub_lang
+ stream_id_list = []
+ if audio_lang:
+ stream_id_list.append('audio-%s' % audio_lang)
+ if hardsub_lang:
+ stream_id_list.append('hardsub-%s' % hardsub_lang)
+ stream_id = '-'.join(stream_id_list)
format_id = '%s-%s' % (stream_format, stream_id)
if stream_format == 'hls':
adaptive_formats = self._extract_m3u8_formats(
format_id = '%s-%s' % (stream_format, stream_id)
if stream_format == 'hls':
adaptive_formats = self._extract_m3u8_formats(