|
|
@ -1144,8 +1144,13 @@ class InfoExtractor(object):
|
|
|
|
ext = textstream.get('ext') or determine_ext(src)
|
|
|
|
ext = textstream.get('ext') or determine_ext(src)
|
|
|
|
if not ext:
|
|
|
|
if not ext:
|
|
|
|
type_ = textstream.get('type')
|
|
|
|
type_ = textstream.get('type')
|
|
|
|
if type_ == 'text/srt':
|
|
|
|
SUBTITLES_TYPES = {
|
|
|
|
ext = 'srt'
|
|
|
|
'text/vtt': 'vtt',
|
|
|
|
|
|
|
|
'text/srt': 'srt',
|
|
|
|
|
|
|
|
'application/smptett+xml': 'tt',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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 subtitles_lang
|
|
|
|
subtitles.setdefault(lang, []).append({
|
|
|
|
subtitles.setdefault(lang, []).append({
|
|
|
|
'url': src,
|
|
|
|
'url': src,
|
|
|
|