From 5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Mon, 18 Oct 2021 15:24:21 -0500 Subject: update from upstream --- hypervideo_dl/extractor/limelight.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'hypervideo_dl/extractor/limelight.py') diff --git a/hypervideo_dl/extractor/limelight.py b/hypervideo_dl/extractor/limelight.py index 39f74d2..369141d 100644 --- a/hypervideo_dl/extractor/limelight.py +++ b/hypervideo_dl/extractor/limelight.py @@ -96,7 +96,9 @@ class LimelightBaseIE(InfoExtractor): urls = [] for stream in pc_item.get('streams', []): stream_url = stream.get('url') - if not stream_url or stream.get('drmProtected') or stream_url in urls: + if not stream_url or stream_url in urls: + continue + if not self.get_param('allow_unplayable_formats') and stream.get('drmProtected'): continue urls.append(stream_url) ext = determine_ext(stream_url) @@ -158,7 +160,10 @@ class LimelightBaseIE(InfoExtractor): for mobile_url in mobile_item.get('mobileUrls', []): media_url = mobile_url.get('mobileUrl') format_id = mobile_url.get('targetMediaPlatform') - if not media_url or format_id in ('Widevine', 'SmoothStreaming') or media_url in urls: + if not media_url or media_url in urls: + continue + if (format_id in ('Widevine', 'SmoothStreaming') + and not self.get_param('allow_unplayable_formats', False)): continue urls.append(media_url) ext = determine_ext(media_url) @@ -173,7 +178,7 @@ class LimelightBaseIE(InfoExtractor): formats.append({ 'url': media_url, 'format_id': format_id, - 'preference': -1, + 'quality': -10, 'ext': ext, }) -- cgit v1.2.3