mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-28 09:31:01 +01:00
[theplatform] extract subtitles with multiple formats from the metadata
This commit is contained in:
parent
98affc1a48
commit
11f502fac1
@ -73,10 +73,10 @@ def _parse_theplatform_metadata(self, info):
|
|||||||
if isinstance(captions, list):
|
if isinstance(captions, list):
|
||||||
for caption in captions:
|
for caption in captions:
|
||||||
lang, src, mime = caption.get('lang', 'en'), caption.get('src'), caption.get('type')
|
lang, src, mime = caption.get('lang', 'en'), caption.get('src'), caption.get('type')
|
||||||
subtitles[lang] = [{
|
subtitles.setdefault(lang, []).append({
|
||||||
'ext': mimetype2ext(mime),
|
'ext': mimetype2ext(mime),
|
||||||
'url': src,
|
'url': src,
|
||||||
}]
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'title': info['title'],
|
'title': info['title'],
|
||||||
|
Loading…
Reference in New Issue
Block a user