Fix misleading DRM message

Closes #4534
This commit is contained in:
pukkandan 2022-08-02 20:29:09 +05:30
parent a0c830f488
commit 7356a44443
No known key found for this signature in database
GPG Key ID: 7EEE9E1E817D0A39
1 changed files with 1 additions and 1 deletions

View File

@ -2488,7 +2488,7 @@ class YoutubeDL:
info_dict['_has_drm'] = any(f.get('has_drm') for f in formats) or None
if not self.params.get('allow_unplayable_formats'):
formats = [f for f in formats if not f.get('has_drm')]
if info_dict['_has_drm'] and all(
if info_dict['_has_drm'] and formats and all(
f.get('acodec') == f.get('vcodec') == 'none' for f in formats):
self.report_warning(
'This video is DRM protected and only images are available for download. '