mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2023-06-08.git
synced 2024-08-15 00:53:38 +00:00
Search: Populate search bar with ChannelId (#3805)
This commit is contained in:
commit
e238c08be5
2 changed files with 6 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
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"
|
templated "search"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue