forked from midou/invidious
Merge pull request #2011 from syeopite/video-alias-url-params
Preserve url params in video route aliases
This commit is contained in:
commit
edb37c95e1
@ -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…
Reference in New Issue
Block a user