1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 17:22:31 +01:00

[common] Fix format_id construction for HLS

This commit is contained in:
Yen Chi Hsuan 2016-04-29 22:49:04 +08:00
parent 00a17a9e12
commit e9c6cdf4a1
No known key found for this signature in database
GPG Key ID: 3FDDD575826C5C30

View File

@ -1142,7 +1142,7 @@ def _extract_m3u8_formats(self, m3u8_url, video_id, ext=None,
# Bandwidth of live streams may differ over time thus making
# format_id unpredictable. So it's better to keep provided
# format_id intact.
if last_media_name and not live:
if not live:
format_id.append(last_media_name if last_media_name else '%d' % (tbr if tbr else len(formats)))
f = {
'format_id': '-'.join(format_id),