diff options
author | Sergey M․ <[email protected]> | 2018-09-16 23:52:27 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2018-09-16 23:54:58 +0700 |
commit | d9b0d118adfa365e8ed67de277f5e83e29c4635c (patch) | |
tree | 43d69860b7aa2d47ee4a8f4efbab94cfefd5fd73 | |
parent | 8b40c92724453995701b75559b190075d6dbfd7d (diff) | |
download | youtube-dl-d9b0d118adfa365e8ed67de277f5e83e29c4635c.tar.gz youtube-dl-d9b0d118adfa365e8ed67de277f5e83e29c4635c.zip |
[vrv] Make format ids deterministic
-rw-r--r-- | youtube_dl/extractor/vrv.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/youtube_dl/extractor/vrv.py b/youtube_dl/extractor/vrv.py index 921e9e172..ac0819c7c 100644 --- 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 [] - 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( |