]> jfr.im git - yt-dlp.git/commitdiff
Fix some `m3u8` not obeying `--allow-unplayable-formats`
authorpukkandan <redacted>
Sun, 4 Apr 2021 12:23:26 +0000 (17:53 +0530)
committerpukkandan <redacted>
Sun, 4 Apr 2021 12:23:26 +0000 (17:53 +0530)
yt_dlp/extractor/common.py

index 0cd217eb3d065ffdcf5eb9d975c6665383f2a191..288ca15d689a0044bb4d6a73f4b3f3461e7f21cb 100644 (file)
@@ -1889,7 +1889,8 @@ def _parse_m3u8_formats(self, m3u8_doc, m3u8_url, ext=None,
         if '#EXT-X-FAXS-CM:' in m3u8_doc:  # Adobe Flash Access
             return []
 
-        if re.search(r'#EXT-X-SESSION-KEY:.*?URI="skd://', m3u8_doc):  # Apple FairPlay
+        if (not self._downloader.params.get('allow_unplayable_formats')
+                and re.search(r'#EXT-X-SESSION-KEY:.*?URI="skd://', m3u8_doc)):  # Apple FairPlay
             return []
 
         formats = []