fix usage of self._merge_subtitles

This commit is contained in:
Mozi 2024-10-28 00:31:55 +00:00
parent 3585397c7f
commit ac5c846921

View File

@ -87,11 +87,11 @@ def _real_extract(self, url):
if ext == 'mpd':
fmts, subs = self._extract_mpd_formats_and_subtitles(playlist_url, video_id)
formats.extend(fmts)
self._merge_subtitles(subs, subtitles)
self._merge_subtitles(subs, target=subtitles)
elif ext == 'm3u8':
fmts, subs = self._extract_m3u8_formats_and_subtitles(playlist_url, video_id, m3u8_id='hls')
formats.extend(fmts)
self._merge_subtitles(subs, subtitles)
self._merge_subtitles(subs, target=subtitles)
else:
raise ExtractorError(f'Unknown playlist URL {playlist_url}', video_id=video_id)