From e0493e90fc4183a3fee114c2d87d3e2463495984 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 25 Aug 2021 02:18:05 +0530 Subject: [PATCH] fix bug in 88acdbc2698169e22cdbf358e44765150434c69e --- 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 422b26ffe..7da25a7ba 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2169,9 +2169,9 @@ class YoutubeDL(object): 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)