[generic] Make generic extractor use hlsnative for m3u8 files

This commit is contained in:
Nehal Patel 2016-08-19 16:08:20 -05:00
parent 7cfc1e2a10
commit d5037ae107

View File

@ -1379,7 +1379,7 @@ class GenericIE(InfoExtractor):
if m:
format_id = m.group('format_id')
if format_id.endswith('mpegurl'):
formats = self._extract_m3u8_formats(url, video_id, 'mp4')
formats = self._extract_m3u8_formats(url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
elif format_id == 'f4m':
formats = self._extract_f4m_formats(url, video_id)
else:
@ -1415,7 +1415,7 @@ class GenericIE(InfoExtractor):
# Is it an M3U playlist?
if first_bytes.startswith(b'#EXTM3U'):
info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4')
info_dict['formats'] = self._extract_m3u8_formats(url, video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
self._sort_formats(info_dict['formats'])
return info_dict
@ -2167,7 +2167,7 @@ class GenericIE(InfoExtractor):
elif ext == 'xspf':
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
elif ext == 'm3u8':
entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4')
entry_info_dict['formats'] = self._extract_m3u8_formats(video_url, video_id, ext='mp4', entry_protocol='m3u8_native', m3u8_id='hls')
elif ext == 'mpd':
entry_info_dict['formats'] = self._extract_mpd_formats(video_url, video_id)
elif ext == 'f4m':