0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-22 02:15:12 +00:00

[limelight] Obey allow_unplayable_formats

This commit is contained in:
pukkandan 2021-04-26 10:46:26 +05:30
parent 6a04a74e8b
commit b982cbdd0e
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -160,7 +160,10 @@ def _extract_info(self, pc, mobile, i, referer):
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)