diff --git a/src/invidious.cr b/src/invidious.cr index d742cd59..d1c3ac83 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -236,6 +236,7 @@ before_all do |env| "/api/manifest/", "/videoplayback", "/latest_version", + "/download", }.any? { |r| env.request.resource.starts_with? r } if env.request.cookies.has_key? "SID" @@ -348,6 +349,8 @@ end Invidious::Routing.get "/e/:id", Invidious::Routes::Watch, :redirect Invidious::Routing.get "/redirect", Invidious::Routes::Misc, :cross_instance_redirect + Invidious::Routing.post "/download", Invidious::Routes::Watch, :download + Invidious::Routing.get "/embed/", Invidious::Routes::Embed, :redirect Invidious::Routing.get "/embed/:id", Invidious::Routes::Embed, :show diff --git a/src/invidious/frontend/watch_page.cr b/src/invidious/frontend/watch_page.cr index d3a50705..80b67641 100644 --- a/src/invidious/frontend/watch_page.cr +++ b/src/invidious/frontend/watch_page.cr @@ -26,12 +26,16 @@ module Invidious::Frontend::WatchPage return String.build(4000) do |str| str << "