This commit is contained in:
pukkandan 2021-08-25 02:18:05 +05:30
parent 1931a55ee8
commit e0493e90fc
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -2169,9 +2169,9 @@ def sanitize_numeric_fields(info):
else:
formats = info_dict['formats']
info_dict['__has_drm'] = any(f.get('has_drm') for f in formats)
if not self.params.get('allow_unplayable_formats'):
formats = [f for f in formats if not f.get('has_drm')]
info_dict['__has_drm'] = len(info_dict.get('formats') or ['']) > len(formats)
if not formats:
self.raise_no_formats(info_dict)