Merge pull request #2011 from syeopite/video-alias-url-params

Preserve url params in video route aliases
pull/1975/head
TheFrenchGhosty 4 years ago committed by GitHub
commit edb37c95e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -189,6 +189,11 @@ class Invidious::Routes::Watch < Invidious::Routes::BaseRoute
end end
def redirect(env) def redirect(env)
return env.redirect "/watch?v=#{env.params.url["id"]}" url = "/watch?v=#{env.params.url["id"]}"
if env.params.query.size > 0
url += "&#{env.params.query}"
end
return env.redirect url
end end
end end

Loading…
Cancel
Save