Compare commits

..

2 Commits

Author SHA1 Message Date
Alard
169e8a3686 Show a warning for subtitles spread over multiple DASH periods. 2024-02-08 02:21:27 +01:00
Alard
64a314a7b6 Remove unnecessary check for empty MPD periods. 2024-02-08 02:09:27 +01:00

View File

@ -2587,6 +2587,12 @@ class InfoExtractor:
elif 'fragments' in f:
formats[format_key].setdefault('fragments', []).extend(f['fragments'])
if len(period['subtitles']) > 0 and len(subtitles) > 0:
self.report_warning(bug_reports_message(
'Found subtitles in multiple periods in the DASH manifest; '
'if part of the subtitles are missing,'
), only_once=True)
for sub_lang, sub_info in period['subtitles'].items():
subtitles.setdefault(sub_lang, []).extend(sub_info)
@ -2930,8 +2936,7 @@ class InfoExtractor:
period_entry['formats'].append(f)
elif content_type == 'text':
period_entry['subtitles'][lang or 'und'].append(f)
if period_entry['formats'] or period_entry['subtitles']:
yield period_entry
yield period_entry
def _extract_ism_formats(self, *args, **kwargs):
fmts, subs = self._extract_ism_formats_and_subtitles(*args, **kwargs)