1
0
Fork 0
mirror of https://github.com/blackjack4494/yt-dlc.git synced 2024-12-22 15:57:23 +00:00

[theplatform] extract subtitles with multiple formats from the metadata

This commit is contained in:
Remita Amine 2016-08-16 16:19:36 +01:00
parent 98affc1a48
commit 11f502fac1

View file

@ -73,10 +73,10 @@ class ThePlatformBaseIE(OnceIE):
if isinstance(captions, list):
for caption in captions:
lang, src, mime = caption.get('lang', 'en'), caption.get('src'), caption.get('type')
subtitles[lang] = [{
subtitles.setdefault(lang, []).append({
'ext': mimetype2ext(mime),
'url': src,
}]
})
return {
'title': info['title'],