Autofill search for playlists and communities page

This commit is contained in:
Omar Roth 2019-07-27 08:51:10 -05:00
parent cfe9d47fa0
commit 4ee3ec09df
No known key found for this signature in database
GPG key ID: B8254FB7EC3D37F2
2 changed files with 4 additions and 1 deletions

View file

@ -903,6 +903,7 @@ get "/search" do |env|
count, videos = search(search_query, page, search_params, region).as(Tuple)
end
env.set "search", query
templated "search"
end
@ -3070,6 +3071,7 @@ get "/channel/:ucid/playlists" do |env|
items = items.map { |item| item.as(SearchPlaylist) }
items.each { |item| item.author = "" }
env.set "search", "channel:#{channel.ucid} "
templated "playlists"
end
@ -3110,6 +3112,7 @@ get "/channel/:ucid/community" do |env|
error_message = ex.message
end
env.set "search", "channel:#{channel.ucid} "
templated "community"
end