1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-01-31 07:09:49 +00:00

[Panopto] Prefer the highest quality stream

This commit is contained in:
Kevin Mark 2017-07-06 22:03:05 -04:00
parent fed0a6a939
commit dec449e22f

View File

@ -81,14 +81,14 @@ class PanoptoIE(PanoptoBaseIE):
'title': this_stream['Tag'],
'formats': [],
}
if 'StreamUrl' in this_stream:
new_stream['formats'].append({
'url': this_stream['StreamUrl'],
})
if 'StreamHttpUrl' in this_stream:
new_stream['formats'].append({
'url': this_stream['StreamHttpUrl'],
})
if 'StreamUrl' in this_stream:
m3u8_formats = self._extract_m3u8_formats(this_stream['StreamUrl'], video_id, 'mp4')
self._sort_formats(m3u8_formats)
new_stream['formats'].extend(m3u8_formats)
if len(new_stream['formats']):
streams.append(new_stream)