Search: Populate search bar with ChannelId (#3805)

pull/3817/head
Samantaz Fox 2 years ago
commit e238c08be5
No known key found for this signature in database
GPG Key ID: F42821059186176E

@ -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

@ -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

Loading…
Cancel
Save