Skip to content

Invidious is an alternative front-end to YouTube

save host when using dash manifest

Andrew Zhaob7fe1db89a7b
diff --git a/src/invidious.cr b/src/invidious.cr
index 5235d826..deb24ac3 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -3190,7 +3190,8 @@ get "/api/manifest/dash/id/:id" do |env|
url = url.rchop("</BaseURL>")
if local
- url = URI.parse(url).full_path
+ uri = URI.parse(url)
+ url = "#{uri.full_path}host/#{uri.host}/"
end
"<BaseURL>#{url}</BaseURL>"