Populate search bar with ChannelId

This commit is contained in:
chunky programmer 2023-05-14 17:25:32 -04:00
parent 3a54e9556b
commit 12b4dd9191
2 changed files with 6 additions and 1 deletions

View file

@ -278,6 +278,7 @@ module Invidious::Routes::Channels
return error_template(500, ex)
end
env.set "search", "channel:" + ucid + " "
return {locale, user, subscriptions, continuation, ucid, channel}
end
end

View file

@ -65,7 +65,11 @@ module Invidious::Routes::Search
redirect_url = Invidious::Frontend::Misc.redirect_url(env)
env.set "search", query.text
if query.type == Invidious::Search::Query::Type::Channel
env.set "search", "channel:" + query.channel + " " + query.text
else
env.set "search", query.text
end
templated "search"
end
end