- subtitles[locale] = [{
- 'url': '%s/%s%s_%s.xml' % (config_doc.attrib['strSubtitleServer'], path, locale, v),
- 'ext': 'ttml',
- }]
+ for url_ext, ext in (('vtt', 'vtt'), ('xml', 'tt')):
+ subtitles.setdefault(locale, []).append({
+ 'url': '%s/%s%s_%s.%s' % (config_doc.attrib['strSubtitleServer'], path, locale, v, url_ext),
+ 'ext': ext,
+ })