mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Handle invalid attribution_links in brand_redirect
This commit is contained in:
parent
6b5035bb83
commit
c72febe7a6
@ -115,12 +115,11 @@ class Invidious::Routes::Channels < Invidious::Routes::BaseRoute
|
||||
|
||||
begin
|
||||
resolved_url = YoutubeAPI.resolve_url("https://youtube.com#{env.request.path}#{yt_url_params.size > 0 ? "?#{yt_url_params}" : ""}")
|
||||
rescue ex : InfoException
|
||||
raise InfoException.new("This channel does not exist.")
|
||||
ucid = resolved_url["endpoint"]["browseEndpoint"]["browseId"]
|
||||
rescue ex : InfoException | KeyError
|
||||
raise InfoException.new(translate(locale, "This channel does not exist."))
|
||||
end
|
||||
|
||||
ucid = resolved_url["endpoint"]["browseEndpoint"]["browseId"]
|
||||
|
||||
selected_tab = env.request.path.split("/")[-1]
|
||||
if ["home", "videos", "playlists", "community", "channels", "about"].includes? selected_tab
|
||||
url = "/channel/#{ucid}/#{selected_tab}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user