Populate search bar with ChannelId

pull/3805/head
chunky programmer 2 years ago
parent 3a54e9556b
commit 12b4dd9191

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

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

Loading…
Cancel
Save