mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-14 09:05:09 +00:00
fix(hls): add missing scheme to m3u8 list
This commit is contained in:
@@ -221,10 +221,16 @@ module Invidious::Routes::API::Manifest
|
|||||||
|
|
||||||
proxy = Invidious::HttpServer::Utils.get_external_proxy
|
proxy = Invidious::HttpServer::Utils.get_external_proxy
|
||||||
|
|
||||||
if !proxy.empty?
|
if CONFIG.https_only
|
||||||
"#{proxy}/videoplayback?#{raw_params}"
|
scheme = "https://"
|
||||||
else
|
else
|
||||||
"#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
scheme = "http://"
|
||||||
|
end
|
||||||
|
|
||||||
|
if !proxy.empty?
|
||||||
|
"#{scheme}#{proxy}/videoplayback?#{raw_params}"
|
||||||
|
else
|
||||||
|
"#{scheme}#{env.request.headers["Host"]}/videoplayback?#{raw_params}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -248,7 +254,12 @@ module Invidious::Routes::API::Manifest
|
|||||||
manifest = response.body
|
manifest = response.body
|
||||||
|
|
||||||
if local
|
if local
|
||||||
manifest = manifest.gsub("https://www.youtube.com", env.request.headers["Host"])
|
if CONFIG.https_only
|
||||||
|
scheme = "https://"
|
||||||
|
else
|
||||||
|
scheme = "http://"
|
||||||
|
end
|
||||||
|
manifest = manifest.gsub("https://www.youtube.com", "#{scheme}#{env.request.headers["Host"]}")
|
||||||
manifest = manifest.gsub("index.m3u8", "index.m3u8?local=true")
|
manifest = manifest.gsub("index.m3u8", "index.m3u8?local=true")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user