[StreamMe] add "Source" to formats list

This commit is contained in:
sh!zeeg 2016-12-30 04:55:16 +03:00
parent f08af07cca
commit 86138f5d5a

View File

@ -94,6 +94,16 @@ class StreamMeIE(InfoExtractor):
# I don't know all the possible protocols yet.
# 'protocol': 'm3u8_native' if fmt_tag == 'mp4-hls' else 'http'
})
if d.get('origin') is not None:
fmt_tag = d.get('origin').get('location').split(':')[0]
formats.append({
'url': d.get('origin').get('location'),
'acodec': d.get('origin').get('audioCodec'),
'vcodec': d.get('origin').get('videoCodec'),
'format_id': 'Source-' + fmt_tag,
'ext': 'flv' if fmt_tag == 'rtmp' else 'mp4',
'source_preference': 1,
})
return formats