alr query param makes youtube return an URL and not video data
All checks were successful
CI / build (push) Successful in 5m8s

This commit is contained in:
Fijxu 2024-12-21 00:34:04 -03:00
parent 279570d47b
commit 985ef449c5
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4

View file

@ -45,6 +45,7 @@ func videoplayback(w http.ResponseWriter, req *http.Request) {
if c == "" { if c == "" {
w.WriteHeader(400) w.WriteHeader(400)
io.WriteString(w, "'c' query string undefined.") io.WriteString(w, "'c' query string undefined.")
return
} }
host := q.Get("host") host := q.Get("host")
@ -92,9 +93,9 @@ func videoplayback(w http.ResponseWriter, req *http.Request) {
return return
} }
if c == "WEB" { // if c == "WEB" {
q.Set("alr", "yes") // q.Set("alr", "yes")
} // }
if req.Header.Get("Range") != "" { if req.Header.Get("Range") != "" {
q.Set("range", req.Header.Get("Range")) q.Set("range", req.Header.Get("Range"))
} }