From 7356a44443995d83c59b915186b6a719769eab60 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Tue, 2 Aug 2022 20:29:09 +0530 Subject: [PATCH] Fix misleading DRM message Closes #4534 --- yt_dlp/YoutubeDL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 7ee83ed4a..0d7564088 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -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. '