]> jfr.im git - yt-dlp.git/commitdiff
[cleanup] Don't pass protocol to `_extract_m3u8_formats` for live videos
authorpukkandan <redacted>
Wed, 2 Mar 2022 17:29:01 +0000 (22:59 +0530)
committerpukkandan <redacted>
Wed, 2 Mar 2022 17:29:48 +0000 (22:59 +0530)
`live` parameter already handles changing the protocol

yt_dlp/extractor/arcpublishing.py
yt_dlp/extractor/dailymotion.py
yt_dlp/extractor/imggaming.py
yt_dlp/extractor/threeqsdn.py
yt_dlp/extractor/tv2.py
yt_dlp/extractor/tvnet.py
yt_dlp/extractor/vgtv.py
yt_dlp/extractor/vimeo.py

index 1943fd5f838c98dbf72a41c8e43ae1140c34019b..8880e5c957396441a2576c50e1e4c00c48c4b1e0 100644 (file)
@@ -124,8 +124,7 @@ def _real_extract(self, url):
                 formats.extend(smil_formats)
             elif stream_type in ('ts', 'hls'):
                 m3u8_formats = self._extract_m3u8_formats(
-                    s_url, uuid, 'mp4', 'm3u8' if is_live else 'm3u8_native',
-                    m3u8_id='hls', fatal=False)
+                    s_url, uuid, 'mp4', live=is_live, m3u8_id='hls', fatal=False)
                 if all([f.get('acodec') == 'none' for f in m3u8_formats]):
                     continue
                 for f in m3u8_formats:
index e714620617461647b7d18e6446955bbd27881aea..95589d53a02149d0934251c0e0830debfa8d5c12 100644 (file)
@@ -259,9 +259,7 @@ def _real_extract(self, url):
                     continue
                 if media_type == 'application/x-mpegURL':
                     formats.extend(self._extract_m3u8_formats(
-                        media_url, video_id, 'mp4',
-                        'm3u8' if is_live else 'm3u8_native',
-                        m3u8_id='hls', fatal=False))
+                        media_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
                 else:
                     f = {
                         'url': media_url,
index bae74b290802f69d3b8f49e44cd6d62d7a9842f2..230dc86d3164b1520406c41a38d5debd3ef2224a 100644 (file)
@@ -96,7 +96,7 @@ def _real_extract(self, url):
                 continue
             if proto == 'hls':
                 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)
                 for f in m3u8_formats:
                     f.setdefault('http_headers', {}).update(self._MANIFEST_HEADERS)
index 22b4fe7c8ce76d99bd599c486fde143c292d627b..00a51dccda4f707dbb9fe491b7a1034327f4783a 100644 (file)
@@ -111,8 +111,7 @@ def _real_extract(self, url):
                 subtitles = self._merge_subtitles(subtitles, subs)
             elif source_type == 'hls':
                 fmts, subs = self._extract_m3u8_formats_and_subtitles(
-                    source, video_id, 'mp4', 'm3u8' if live else 'm3u8_native',
-                    m3u8_id='hls', fatal=False)
+                    source, video_id, 'mp4', live=live, m3u8_id='hls', fatal=False)
                 formats.extend(fmts)
                 subtitles = self._merge_subtitles(subtitles, subs)
             elif source_type == 'progressive':
index b48dfe389f601456b260b25959d72a0963be4234..977da30feedce9224613b184d48cd4653a10bd28 100644 (file)
@@ -81,9 +81,7 @@ def _real_extract(self, url):
                 elif ext == 'm3u8':
                     if not data.get('drmProtected'):
                         formats.extend(self._extract_m3u8_formats(
-                            video_url, video_id, 'mp4',
-                            'm3u8' if is_live else 'm3u8_native',
-                            m3u8_id=format_id, fatal=False))
+                            video_url, video_id, 'mp4', live=is_live, m3u8_id=format_id, fatal=False))
                 elif ext == 'mpd':
                     formats.extend(self._extract_mpd_formats(
                         video_url, video_id, format_id, fatal=False))
@@ -244,9 +242,7 @@ def _real_extract(self, url):
                 elif ext == 'm3u8':
                     if not data.get('drmProtected'):
                         formats.extend(self._extract_m3u8_formats(
-                            video_url, video_id, 'mp4',
-                            'm3u8' if is_live else 'm3u8_native',
-                            m3u8_id=format_id, fatal=False))
+                            video_url, video_id, 'mp4', live=is_live, m3u8_id=format_id, fatal=False))
                 elif ext == 'mpd':
                     formats.extend(self._extract_mpd_formats(
                         video_url, video_id, format_id, fatal=False))
index 4fe8dfb6c2eefe6027eb4d9cbe0cdbe8c4cfc7ad..aa1e9d9234778cf937c0a8e194903fbb5adad4d7 100644 (file)
@@ -111,9 +111,7 @@ def _real_extract(self, url):
                 continue
             stream_urls.add(stream_url)
             formats.extend(self._extract_m3u8_formats(
-                stream_url, video_id, 'mp4',
-                entry_protocol='m3u8' if is_live else 'm3u8_native',
-                m3u8_id='hls', fatal=False))
+                stream_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
         self._sort_formats(formats)
 
         # better support for radio streams
index 10083cd24158a348c1e3ed5b804a530639ba2add..9d6090b08e091ff1b190f481bec97780dd7a397c 100644 (file)
@@ -195,9 +195,7 @@ def _real_extract(self, url):
         hls_url = streams.get('hls')
         if hls_url:
             formats.extend(self._extract_m3u8_formats(
-                hls_url, video_id, 'mp4',
-                entry_protocol='m3u8' if is_live else 'm3u8_native',
-                m3u8_id='hls', fatal=False))
+                hls_url, video_id, 'mp4', live=is_live, m3u8_id='hls', fatal=False))
 
         hds_url = streams.get('hds')
         if hds_url:
index c2dec244ff19f706f91f2ba8b907a520cd324074..1a9fd00e40505e5d90981652a06df8acd40845d8 100644 (file)
@@ -166,8 +166,7 @@ def _parse_config(self, config, video_id):
                 for f_id, m_url in sep_manifest_urls:
                     if files_type == 'hls':
                         fmts, subs = self._extract_m3u8_formats_and_subtitles(
-                            m_url, video_id, 'mp4',
-                            'm3u8' if is_live else 'm3u8_native', m3u8_id=f_id,
+                            m_url, video_id, 'mp4', live=is_live, m3u8_id=f_id,
                             note='Downloading %s m3u8 information' % cdn_name,
                             fatal=False)
                         formats.extend(fmts)