From 4ee3ec09df8a980239fb040d77731b4d52705d7a Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Sat, 27 Jul 2019 08:51:10 -0500 Subject: [PATCH] Autofill search for playlists and communities page --- src/invidious.cr | 3 +++ src/invidious/views/template.ecr | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/invidious.cr b/src/invidious.cr index 835cffc78..b560fcb90 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -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 diff --git a/src/invidious/views/template.ecr b/src/invidious/views/template.ecr index 0d8c99249..6272d2be7 100644 --- a/src/invidious/views/template.ecr +++ b/src/invidious/views/template.ecr @@ -35,7 +35,7 @@