1
0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2025-02-26 20:09:57 +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'], 'title': this_stream['Tag'],
'formats': [], 'formats': [],
} }
if 'StreamUrl' in this_stream:
new_stream['formats'].append({
'url': this_stream['StreamUrl'],
})
if 'StreamHttpUrl' in this_stream: if 'StreamHttpUrl' in this_stream:
new_stream['formats'].append({ new_stream['formats'].append({
'url': this_stream['StreamHttpUrl'], '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']): if len(new_stream['formats']):
streams.append(new_stream) streams.append(new_stream)