mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-04-11.git
synced 2024-08-15 00:43:26 +00:00
Add new /channel/:ucid/search endpoint
This commit is contained in:
parent
252833fdef
commit
a9ff18812a
2 changed files with 7 additions and 2 deletions
|
@ -325,8 +325,9 @@ end
|
|||
Invidious::Routing.get "/channel/:ucid/community", Invidious::Routes::Channels, :community
|
||||
Invidious::Routing.get "/channel/:ucid/channels", Invidious::Routes::Channels, :channels
|
||||
Invidious::Routing.get "/channel/:ucid/about", Invidious::Routes::Channels, :about
|
||||
Invidious::Routing.get "/channel/:ucid/search", Invidious::Routes::Channels, :search
|
||||
|
||||
["", "/videos", "/playlists", "/community", "/about"].each do |path|
|
||||
["", "/home", "/videos", "/playlists", "/community", "/channels", "/about", "/search"].each do |path|
|
||||
# /c/LinusTechTips
|
||||
Invidious::Routing.get "/c/:user#{path}", Invidious::Routes::Channels, :brand_redirect
|
||||
# /user/linustechtips | Not always the same as /c/
|
||||
|
|
|
@ -240,7 +240,11 @@ module Invidious::Routes::Channels
|
|||
end
|
||||
end
|
||||
|
||||
private def self.fetch_basic_information(env)
|
||||
private def search(env)
|
||||
return env.redirect "/search?#{env.params.query}&channel=#{env.params.url["ucid"]}"
|
||||
end
|
||||
|
||||
private def fetch_basic_information(env)
|
||||
locale = LOCALES[env.get("preferences").as(Preferences).locale]?
|
||||
|
||||
user = env.get? "user"
|
||||
|
|
Loading…
Reference in a new issue