From: Remita Amine Date: Tue, 16 Aug 2016 15:19:36 +0000 (+0100) Subject: [theplatform] extract subtitles with multiple formats from the metadata X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=11f502fac145b4592f47c025ee8317fe44020db0;p=youtube-dl [theplatform] extract subtitles with multiple formats from the metadata --- diff --git a/youtube_dl/extractor/theplatform.py b/youtube_dl/extractor/theplatform.py index eda899497..23067e8c6 100644 --- a/youtube_dl/extractor/theplatform.py +++ b/youtube_dl/extractor/theplatform.py @@ -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'],