0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-16 01:25:06 +00:00

[mtv] Fix for videos with missing bitrates

This commit is contained in:
Yen Chi Hsuan 2016-07-26 13:12:24 +08:00
parent 4d3e543c73
commit 10a1bb3a78
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30

View file

@ -91,7 +91,7 @@ def _extract_video_formats(self, mdoc, mtvn_id):
formats.extend([{
'ext': 'flv' if new_url.startswith('rtmp') else ext,
'url': new_url,
'format_id': '-'.join([kind, rendition.get('bitrate')]),
'format_id': '-'.join(filter(None, [kind, rendition.get('bitrate')])),
'width': int(rendition.get('width')),
'height': int(rendition.get('height')),
} for kind, new_url in new_urls.items()])