mirror of https://github.com/yt-dlp/yt-dlp.git
[cleanup] Don't pass protocol to `_extract_m3u8_formats` for live videos
`live` parameter already handles changing the protocol
This commit is contained in:
parent
f494ddada8
commit
a5c0c20252
|
@ -124,8 +124,7 @@ class ArcPublishingIE(InfoExtractor):
|
||||||
formats.extend(smil_formats)
|
formats.extend(smil_formats)
|
||||||
elif stream_type in ('ts', 'hls'):
|
elif stream_type in ('ts', 'hls'):
|
||||||
m3u8_formats = self._extract_m3u8_formats(
|
m3u8_formats = self._extract_m3u8_formats(
|
||||||
s_url, uuid, 'mp4', 'm3u8' if is_live else 'm3u8_native',
|
s_url, uuid, 'mp4', live=is_live, m3u8_id='hls', fatal=False)
|
||||||
m3u8_id='hls', fatal=False)
|
|
||||||
if all([f.get('acodec') == 'none' for f in m3u8_formats]):
|
if all([f.get('acodec') == 'none' for f in m3u8_formats]):
|
||||||
continue
|
continue
|
||||||
for f in m3u8_formats:
|
for f in m3u8_formats:
|
||||||
|
|
|
@ -259,9 +259,7 @@ class DailymotionIE(DailymotionBaseInfoExtractor):
|
||||||
continue
|
continue
|
||||||
if media_type == 'application/x-mpegURL':
|
if media_type == 'application/x-mpegURL':
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
media_url, video_id, 'mp4',
|
media_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
|
||||||
'm3u8' if is_live else 'm3u8_native',
|
|
||||||
m3u8_id='hls', fatal=False))
|
|
||||||
else:
|
else:
|
||||||
f = {
|
f = {
|
||||||
'url': media_url,
|
'url': media_url,
|
||||||
|
|
|
@ -96,7 +96,7 @@ class ImgGamingBaseIE(InfoExtractor):
|
||||||
continue
|
continue
|
||||||
if proto == 'hls':
|
if proto == 'hls':
|
||||||
m3u8_formats = self._extract_m3u8_formats(
|
m3u8_formats = self._extract_m3u8_formats(
|
||||||
media_url, media_id, 'mp4', 'm3u8' if is_live else 'm3u8_native',
|
media_url, media_id, 'mp4', live=is_live,
|
||||||
m3u8_id='hls', fatal=False, headers=self._MANIFEST_HEADERS)
|
m3u8_id='hls', fatal=False, headers=self._MANIFEST_HEADERS)
|
||||||
for f in m3u8_formats:
|
for f in m3u8_formats:
|
||||||
f.setdefault('http_headers', {}).update(self._MANIFEST_HEADERS)
|
f.setdefault('http_headers', {}).update(self._MANIFEST_HEADERS)
|
||||||
|
|
|
@ -111,8 +111,7 @@ class ThreeQSDNIE(InfoExtractor):
|
||||||
subtitles = self._merge_subtitles(subtitles, subs)
|
subtitles = self._merge_subtitles(subtitles, subs)
|
||||||
elif source_type == 'hls':
|
elif source_type == 'hls':
|
||||||
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
||||||
source, video_id, 'mp4', 'm3u8' if live else 'm3u8_native',
|
source, video_id, 'mp4', live=live, m3u8_id='hls', fatal=False)
|
||||||
m3u8_id='hls', fatal=False)
|
|
||||||
formats.extend(fmts)
|
formats.extend(fmts)
|
||||||
subtitles = self._merge_subtitles(subtitles, subs)
|
subtitles = self._merge_subtitles(subtitles, subs)
|
||||||
elif source_type == 'progressive':
|
elif source_type == 'progressive':
|
||||||
|
|
|
@ -81,9 +81,7 @@ class TV2IE(InfoExtractor):
|
||||||
elif ext == 'm3u8':
|
elif ext == 'm3u8':
|
||||||
if not data.get('drmProtected'):
|
if not data.get('drmProtected'):
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
video_url, video_id, 'mp4',
|
video_url, video_id, 'mp4', live=is_live, m3u8_id=format_id, fatal=False))
|
||||||
'm3u8' if is_live else 'm3u8_native',
|
|
||||||
m3u8_id=format_id, fatal=False))
|
|
||||||
elif ext == 'mpd':
|
elif ext == 'mpd':
|
||||||
formats.extend(self._extract_mpd_formats(
|
formats.extend(self._extract_mpd_formats(
|
||||||
video_url, video_id, format_id, fatal=False))
|
video_url, video_id, format_id, fatal=False))
|
||||||
|
@ -244,9 +242,7 @@ class KatsomoIE(InfoExtractor):
|
||||||
elif ext == 'm3u8':
|
elif ext == 'm3u8':
|
||||||
if not data.get('drmProtected'):
|
if not data.get('drmProtected'):
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
video_url, video_id, 'mp4',
|
video_url, video_id, 'mp4', live=is_live, m3u8_id=format_id, fatal=False))
|
||||||
'm3u8' if is_live else 'm3u8_native',
|
|
||||||
m3u8_id=format_id, fatal=False))
|
|
||||||
elif ext == 'mpd':
|
elif ext == 'mpd':
|
||||||
formats.extend(self._extract_mpd_formats(
|
formats.extend(self._extract_mpd_formats(
|
||||||
video_url, video_id, format_id, fatal=False))
|
video_url, video_id, format_id, fatal=False))
|
||||||
|
|
|
@ -111,9 +111,7 @@ class TVNetIE(InfoExtractor):
|
||||||
continue
|
continue
|
||||||
stream_urls.add(stream_url)
|
stream_urls.add(stream_url)
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
stream_url, video_id, 'mp4',
|
stream_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
|
||||||
entry_protocol='m3u8' if is_live else 'm3u8_native',
|
|
||||||
m3u8_id='hls', fatal=False))
|
|
||||||
self._sort_formats(formats)
|
self._sort_formats(formats)
|
||||||
|
|
||||||
# better support for radio streams
|
# better support for radio streams
|
||||||
|
|
|
@ -195,9 +195,7 @@ class VGTVIE(XstreamIE):
|
||||||
hls_url = streams.get('hls')
|
hls_url = streams.get('hls')
|
||||||
if hls_url:
|
if hls_url:
|
||||||
formats.extend(self._extract_m3u8_formats(
|
formats.extend(self._extract_m3u8_formats(
|
||||||
hls_url, video_id, 'mp4',
|
hls_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
|
||||||
entry_protocol='m3u8' if is_live else 'm3u8_native',
|
|
||||||
m3u8_id='hls', fatal=False))
|
|
||||||
|
|
||||||
hds_url = streams.get('hds')
|
hds_url = streams.get('hds')
|
||||||
if hds_url:
|
if hds_url:
|
||||||
|
|
|
@ -166,8 +166,7 @@ class VimeoBaseInfoExtractor(InfoExtractor):
|
||||||
for f_id, m_url in sep_manifest_urls:
|
for f_id, m_url in sep_manifest_urls:
|
||||||
if files_type == 'hls':
|
if files_type == 'hls':
|
||||||
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
fmts, subs = self._extract_m3u8_formats_and_subtitles(
|
||||||
m_url, video_id, 'mp4',
|
m_url, video_id, 'mp4', live=is_live, m3u8_id=f_id,
|
||||||
'm3u8' if is_live else 'm3u8_native', m3u8_id=f_id,
|
|
||||||
note='Downloading %s m3u8 information' % cdn_name,
|
note='Downloading %s m3u8 information' % cdn_name,
|
||||||
fatal=False)
|
fatal=False)
|
||||||
formats.extend(fmts)
|
formats.extend(fmts)
|
||||||
|
|
Loading…
Reference in New Issue