mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-15 00:58:31 +00:00
Fix redirect for attribution_links
This commit is contained in:
parent
36a4647fba
commit
9962964f48
@ -106,7 +106,7 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
|||||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
resolved_url = YoutubeAPI.resolve_url("https://youtube.com#{env.request.path}")
|
resolved_url = YoutubeAPI.resolve_url("https://youtube.com#{env.request.path}#{env.params.query.size > 0 ? "?#{env.params.query}" : ""}")
|
||||||
rescue ex : InfoException
|
rescue ex : InfoException
|
||||||
raise InfoException.new("This channel does not exist.")
|
raise InfoException.new("This channel does not exist.")
|
||||||
end
|
end
|
||||||
@ -120,10 +120,6 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
|||||||
url = "/channel/#{ucid}"
|
url = "/channel/#{ucid}"
|
||||||
end
|
end
|
||||||
|
|
||||||
if env.params.query.size > 0
|
|
||||||
url += "?#{env.params.query}"
|
|
||||||
end
|
|
||||||
|
|
||||||
env.redirect url
|
env.redirect url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user