From 50942e84865dc33fe4f835833e43dd4e67194fd6 Mon Sep 17 00:00:00 2001 From: Mallyd11 Date: Sun, 17 May 2026 15:54:22 -0400 Subject: [PATCH] fix(m3u8): add missing '/' separator in segment and key URI construction _parseTsList and _extractKeyAttributes both build URLs by concatenating m3u8Host (no trailing slash from path.dirname) with a relative token. Without '/' the result is host/proxy/oppai/kiteTOKEN instead of the correct host/proxy/oppai/kite/TOKEN, causing every segment and AES-128 key request to hit the wrong path and the download to fail silently. Fix mirrors the existing correct pattern in voe_extractor.dart line 90. --- lib/services/download_manager/m3u8/m3u8_downloader.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/download_manager/m3u8/m3u8_downloader.dart b/lib/services/download_manager/m3u8/m3u8_downloader.dart index 264fee3d..f519f1c0 100644 --- a/lib/services/download_manager/m3u8/m3u8_downloader.dart +++ b/lib/services/download_manager/m3u8/m3u8_downloader.dart @@ -278,7 +278,7 @@ class M3u8Downloader { index++; final tsUrl = line.startsWith('http') ? line - : '$host${line.replaceFirst("/", "")}'; + : '$host/${line.replaceFirst("/", "")}'; tsList.add(TsInfo('TS_$index', tsUrl)); } return tsList; @@ -318,7 +318,7 @@ class M3u8Downloader { String? uri = match.group(1); if (uri != null && !uri.contains('http')) { - uri = '$host$uri'; + uri = '$host/${uri.replaceFirst("/", "")}'; } final ivStr = match.group(2);