1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-08-15 00:48:28 +00:00

[ie/digitalconcerthall] Fix formats extraction

Authored by: bashonly
This commit is contained in:
bashonly 2025-08-06 18:38:46 -05:00
parent fe53ebe5b6
commit 37a69d1842
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -4,6 +4,7 @@
from ..networking.exceptions import HTTPError from ..networking.exceptions import HTTPError
from ..utils import ( from ..utils import (
ExtractorError, ExtractorError,
determine_ext,
jwt_decode_hs256, jwt_decode_hs256,
parse_codecs, parse_codecs,
try_get, try_get,
@ -222,11 +223,18 @@ def _entries(self, items, language, type_, **kwargs):
raise raise
formats = [] formats = []
for m3u8_url in traverse_obj(stream_info, ('channel', ..., 'stream', ..., 'url', {url_or_none})): for fmt_url in traverse_obj(stream_info, ('channel', ..., 'stream', ..., 'url', {url_or_none})):
formats.extend(self._extract_m3u8_formats(m3u8_url, video_id, 'mp4', m3u8_id='hls', fatal=False)) ext = determine_ext(fmt_url)
for fmt in formats: if ext == 'm3u8':
fmts = self._extract_m3u8_formats(fmt_url, video_id, 'mp4', m3u8_id='hls', fatal=False)
for fmt in fmts:
if fmt.get('format_note') and fmt.get('vcodec') == 'none': if fmt.get('format_note') and fmt.get('vcodec') == 'none':
fmt.update(parse_codecs(fmt['format_note'])) fmt.update(parse_codecs(fmt['format_note']))
formats.extend(fmts)
elif ext == 'mpd':
formats.extend(self._extract_mpd_formats(fmt_url, video_id, mpd_id='dash', fatal=False))
else:
self.report_warning(f'Skipping unsupported format extension "{ext}"')
yield { yield {
'id': video_id, 'id': video_id,