aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/limelight.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-10-18 15:24:21 -0500
committerJesús <heckyel@hyperbola.info>2021-10-18 15:24:21 -0500
commit5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e (patch)
tree65209bc739db35e31f1c9b5b868eb5df4fe12ae3 /hypervideo_dl/extractor/limelight.py
parent27fe903c511691c078942bef5ee9a05a43b15c8f (diff)
downloadhypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.lz
hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.tar.xz
hypervideo-5122028a4bcac4ae577ef7fbd55ccad5cb34ef5e.zip
update from upstream
Diffstat (limited to 'hypervideo_dl/extractor/limelight.py')
-rw-r--r--hypervideo_dl/extractor/limelight.py11
1 files changed, 8 insertions, 3 deletions
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,
})