aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_InfoExtractor.py
diff options
context:
space:
mode:
authorFelix S <felix.von.s@posteo.de>2016-11-07 15:45:42 +0100
committerFelix S <felix.von.s@posteo.de>2021-04-28 17:19:57 +0530
commita0c3b2d5cf4fe374a2b0119ea53b71c9a06aaee9 (patch)
treea359bf6144dbe0b79503c575ea9f0f398fdbf157 /test/test_InfoExtractor.py
parent19bb39202d10e171378fc407b1e0590bbb9df96b (diff)
downloadhypervideo-pre-a0c3b2d5cf4fe374a2b0119ea53b71c9a06aaee9.tar.lz
hypervideo-pre-a0c3b2d5cf4fe374a2b0119ea53b71c9a06aaee9.tar.xz
hypervideo-pre-a0c3b2d5cf4fe374a2b0119ea53b71c9a06aaee9.zip
[extractor/common] Extract HLS subtitle tracks
_extract_m3u8_formats is renamed to _extract_m3u8_formats_and_subtitles and extended to handle subtitle tracks instead of skipping them; a wrapper with the old name is provided for compatibility. _parse_m3u8_formats is likewise renamed and extended, but without adding the compatibility wrapper; the test suite is adjusted to test the enhanced method instead.
Diffstat (limited to 'test/test_InfoExtractor.py')
-rw-r--r--test/test_InfoExtractor.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py
index a08616694..9e059723f 100644
--- a/test/test_InfoExtractor.py
+++ b/test/test_InfoExtractor.py
@@ -684,17 +684,19 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/
'width': 1920,
'height': 1080,
'vcodec': 'avc1.64002a',
- }]
+ }],
+ {}
),
]
- for m3u8_file, m3u8_url, expected_formats in _TEST_CASES:
+ for m3u8_file, m3u8_url, expected_formats, expected_subs in _TEST_CASES:
with io.open('./test/testdata/m3u8/%s.m3u8' % m3u8_file,
mode='r', encoding='utf-8') as f:
- formats = self.ie._parse_m3u8_formats(
+ formats, subs = self.ie._parse_m3u8_formats_and_subtitles(
f.read(), m3u8_url, ext='mp4')
self.ie._sort_formats(formats)
expect_value(self, formats, expected_formats, None)
+ expect_value(self, subs, expected_subs, None)
def test_parse_mpd_formats(self):
_TEST_CASES = [