1
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-03-09 12:50:23 -05:00
This commit is contained in:
merismal34 2025-03-09 23:05:55 +05:30 committed by GitHub
commit 4266bfcfd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2174,6 +2174,9 @@ def extract_media(x_media_line):
subtitles.setdefault(lang, []).append(sub_info) subtitles.setdefault(lang, []).append(sub_info)
if media_type not in ('VIDEO', 'AUDIO'): if media_type not in ('VIDEO', 'AUDIO'):
return return
channels = media.get('CHANNELS')
if channels is not None and str(channels).isdigit():
channels = int(channels)
media_url = media.get('URI') media_url = media.get('URI')
if media_url: if media_url:
manifest_url = format_url(media_url) manifest_url = format_url(media_url)
@ -2184,6 +2187,7 @@ def extract_media(x_media_line):
'url': manifest_url, 'url': manifest_url,
'manifest_url': m3u8_url, 'manifest_url': m3u8_url,
'language': media.get('LANGUAGE'), 'language': media.get('LANGUAGE'),
'audio_channels': channels,
'ext': ext, 'ext': ext,
'protocol': entry_protocol, 'protocol': entry_protocol,
'preference': preference, 'preference': preference,