mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-22 16:29:10 -04:00
Fix error next steps not showing on playlist pages
When validating if an Invidious page is available on YouTube, we used the `env.request.path` variable which doesn't contain url parameters, something that is needed for differentiating IV and YT playlists
This commit is contained in:
parent
7ddab5b8cd
commit
c2297ebc25
@ -109,10 +109,10 @@ def error_json_helper(env : HTTP::Server::Context, locale : Hash(String, JSON::A
|
||||
end
|
||||
|
||||
def error_redirect_helper(env : HTTP::Server::Context, locale : Hash(String, JSON::Any) | Nil)
|
||||
request_path = env.request.path
|
||||
request_resource = env.request.resource
|
||||
|
||||
if request_path.starts_with?("/search") || request_path.starts_with?("/watch") ||
|
||||
request_path.starts_with?("/channel") || request_path.starts_with?("/playlist?list=PL")
|
||||
if request_resource.starts_with?("/search") || request_resource.starts_with?("/watch") ||
|
||||
request_resource.starts_with?("/channel") || request_resource.starts_with?("/playlist?list=PL")
|
||||
next_steps_text = translate(locale, "next_steps_error_message")
|
||||
refresh = translate(locale, "next_steps_error_message_refresh")
|
||||
go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube")
|
||||
|
Loading…
x
Reference in New Issue
Block a user