修复加密m3u8获取key文件相对路径url错误

如果加密的m3u8的key文件url是相对路径,则需要补充主域名信息,代码中直接获取了line当前行的字符串,导致错误,应该为取出来的URI字符串
main
MGGG 2023-02-09 13:51:40 +08:00 committed by GitHub
parent dc26c9b80f
commit 75fc573345
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ func (this *downloadEnv) getM3u8Key(m3u8Url string, html string) (key string, er
keyUrl := strings.Split(line[uriPos:quotationMarkPos], "\"")[1]
if !strings.Contains(line, "http") {
var errMsg string
keyUrl, errMsg = resolveRefUrl(m3u8Url, line)
keyUrl, errMsg = resolveRefUrl(m3u8Url, keyUrl)
if errMsg != "" {
return "", errors.New(errMsg)
}