harden manifest detection and downloader failure coverage

This commit is contained in:
2026-04-21 20:55:14 +02:00
parent dfa8095e1d
commit 96348a6a34
2 changed files with 74 additions and 1 deletions

View File

@@ -386,7 +386,7 @@ func isManifestResponse(contentType string, peek []byte) bool {
return true
}
s := strings.TrimSpace(strings.ToLower(string(peek)))
if strings.HasPrefix(s, "<?xml") && strings.Contains(s, "<mpd") {
if (strings.HasPrefix(s, "<?xml") && strings.Contains(s, "<mpd")) || strings.HasPrefix(s, "<mpd") {
return true
}
if strings.HasPrefix(s, "#extm3u") {