| … | … | @@ -88,17 +88,23 @@ def set_adaptive_stream(list_item, data: Dict[str, Any]) -> Optional[str]: |
| 88 | 88 | URL to ISA is how the previous attempt ended up fetching the variant |
| 89 | 89 | playlist bare and taking a 403 from the CDN. |
| 90 | 90 | """ |
| 91 | | # Opt-in ONLY. Engaging ISA for every .m3u8 broke audio on 2026-08-10: |
| 91 | # Opt-in ONLY, by explicit flag or an `adaptive=1` marker the source puts in |
| 92 | # its own URL. Engaging ISA for every .m3u8 broke audio on 2026-08-10: |
| 92 | 93 | # it captured the single-variant rows as well as the adaptive one, and on |
| 93 | 94 | # muxed HLS (audio inside the video segments, no EXT-X-MEDIA rendition) ISA |
| 94 | 95 | # opens the aac decoder and then stalls -- "CVideoPlayerAudio::Process - |
| 95 | 96 | # stream stalled", no sound, on content that played fine through the bare |
| 96 | | # ffmpeg demuxer. Nothing sets this flag yet, so ISA stays off until a |
| 97 | | # source explicitly asks for it AND the muxed-audio stall is understood. |
| 98 | | if not data.get("adaptive"): |
| 97 | # ffmpeg demuxer. |
| 98 | # |
| 99 | # Handing ISA a MASTER playlist instead is fine, and measured on the Pi it |
| 100 | # is strictly better than the ffmpeg demuxer: audio plays, seek lands (50% |
| 101 | # -> 14:07, where ffmpeg ignored the same request and stayed at 1.2%) and |
| 102 | # pause works. So the opt-in exists to keep single-variant media playlists |
| 103 | # away from ISA, not to keep ISA away from ladders. |
| 104 | url = data.get("url") or "" |
| 105 | if not (data.get("adaptive") or "adaptive=1" in url): |
| 99 | 106 | return None |
| 100 | 107 | |
| 101 | | url = data.get("url") or "" |
| 102 | 108 | kind = adaptive_manifest_type(url) |
| 103 | 109 | if not kind: |
| 104 | 110 | return None |