Preserve url params in video aliases

This commit is contained in:
syeopite 2021-04-11 22:09:46 -07:00
parent 42be1321b2
commit 45d687c4e1
No known key found for this signature in database
GPG Key ID: 6FA616E5A5294A82
1 changed files with 6 additions and 1 deletions

View File

@ -189,6 +189,11 @@ class Invidious::Routes::Watch < Invidious::Routes::BaseRoute
end
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