mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-14 00:28:31 +00: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
|
begin
|
||||||
resolved_url = YoutubeAPI.resolve_url("https://youtube.com#{env.request.path}#{yt_url_params.size > 0 ? "?#{yt_url_params}" : ""}")
|
resolved_url = YoutubeAPI.resolve_url("https://youtube.com#{env.request.path}#{yt_url_params.size > 0 ? "?#{yt_url_params}" : ""}")
|
||||||
rescue ex : InfoException
|
ucid = resolved_url["endpoint"]["browseEndpoint"]["browseId"]
|
||||||
raise InfoException.new("This channel does not exist.")
|
rescue ex : InfoException | KeyError
|
||||||
|
raise InfoException.new(translate(locale, "This channel does not exist."))
|
||||||
end
|
end
|
||||||
|
|
||||||
ucid = resolved_url["endpoint"]["browseEndpoint"]["browseId"]
|
|
||||||
|
|
||||||
selected_tab = env.request.path.split("/")[-1]
|
selected_tab = env.request.path.split("/")[-1]
|
||||||
if ["home", "videos", "playlists", "community", "channels", "about"].includes? selected_tab
|
if ["home", "videos", "playlists", "community", "channels", "about"].includes? selected_tab
|
||||||
url = "/channel/#{ucid}/#{selected_tab}"
|
url = "/channel/#{ucid}/#{selected_tab}"
|
||||||
|
Loading…
Reference in New Issue
Block a user