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.
This commit is contained in:
Mallyd11 2026-05-17 15:54:22 -04:00
parent d27443470f
commit 50942e8486

View file

@ -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);