fixup! fixup! Use mvi and mn query params to build host url
All checks were successful
CI / build (push) Successful in 1m16s

This commit is contained in:
Fijxu 2024-10-08 23:12:10 -03:00
parent 6f5f04c618
commit 8c755cf28c
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -100,6 +100,7 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
q := req.URL.Query() q := req.URL.Query()
host := q.Get("host") host := q.Get("host")
q.Del("host")
if len(host) <= 0 { if len(host) <= 0 {
host = q.Get("hls_chunk_host") host = q.Get("hls_chunk_host")
@ -123,12 +124,8 @@ func (*requesthandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
return return
} }
host = "rr" + mvi + "---" + mn[0] + ".googlevideo.com" host = "rr" + mvi + "---" + mn[0] + ".googlevideo.com"
} else {
io.WriteString(w, "Not possible to build host url from `mvi` and `mn`.")
} }
q.Del("host")
parts := strings.Split(strings.ToLower(host), ".") parts := strings.Split(strings.ToLower(host), ".")
if len(parts) < 2 { if len(parts) < 2 {