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

[YoutubeDL] Make sure format id is not empty

This commit is contained in:
Sergey M․ 2017-08-12 17:14:11 +07:00
parent ac8491fcca
commit e74e3b63e3
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -1500,7 +1500,7 @@ def is_wellformed(f):
sanitize_string_field(format, 'format_id') sanitize_string_field(format, 'format_id')
sanitize_numeric_fields(format) sanitize_numeric_fields(format)
format['url'] = sanitize_url(format['url']) format['url'] = sanitize_url(format['url'])
if format.get('format_id') is None: if not format.get('format_id'):
format['format_id'] = compat_str(i) format['format_id'] = compat_str(i)
else: else:
# Sanitize format_id from characters used in format selector expression # Sanitize format_id from characters used in format selector expression