[common] _parse_smil_subtitles: accept `lang` as the subtitle language
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 20 Aug 2015 15:18:58 +0000 (23:18 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 20 Aug 2015 15:18:58 +0000 (23:18 +0800)
youtube_dl/extractor/common.py

index ce2030d28264eb33b53571c0e53ef24ddac09502..999afc1106a6d85aff2153b57a0787d816db01ff 100644 (file)
@@ -1151,7 +1151,7 @@ class InfoExtractor(object):
                 }
                 if type_ in SUBTITLES_TYPES:
                     ext = SUBTITLES_TYPES[type_]
-            lang = textstream.get('systemLanguage') or textstream.get('systemLanguageName') or subtitles_lang
+            lang = textstream.get('systemLanguage') or textstream.get('systemLanguageName') or textstream.get('lang') or subtitles_lang
             subtitles.setdefault(lang, []).append({
                 'url': src,
                 'ext': ext,