aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-04-26 10:46:26 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-04-26 10:56:55 +0530
commitb982cbdd0e83451b42dca8f7e59b40344b7ecf2b (patch)
tree41e8f7a80faa7bc970f7aa835c23ad5ed8569700
parent6a04a74e8b4e45b9699f5a990007db50e8e5a34b (diff)
downloadhypervideo-pre-b982cbdd0e83451b42dca8f7e59b40344b7ecf2b.tar.lz
hypervideo-pre-b982cbdd0e83451b42dca8f7e59b40344b7ecf2b.tar.xz
hypervideo-pre-b982cbdd0e83451b42dca8f7e59b40344b7ecf2b.zip
[limelight] Obey `allow_unplayable_formats`
-rw-r--r--yt_dlp/extractor/limelight.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/yt_dlp/extractor/limelight.py b/yt_dlp/extractor/limelight.py
index c0c35511f..d1f0edc6b 100644
--- a/yt_dlp/extractor/limelight.py
+++ b/yt_dlp/extractor/limelight.py
@@ -160,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._downloader.params.get('allow_unplayable_formats', False)):
continue
urls.append(media_url)
ext = determine_ext(media_url)