@ -2,7 +2,6 @@
<title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title>
<title><%= search_query.not_nil!.size > 30 ? HTML.escape(query.not_nil![0,30].rstrip(".") + "...") : HTML.escape(query.not_nil!) %> - Invidious</title>
<% end %>
<% end %>
<!-- Search redirection and filtering UI -->
<% if count == 0 %>
<% if count == 0 %>
<h3 style="text-align: center">
<h3 style="text-align: center">
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Broken? Try another Invidious Instance!") %></a>
<a href="/redirect?referer=<%= env.get?("current_page") %>"><%= translate(locale, "Broken? Try another Invidious Instance!") %></a>
@ -21,7 +20,7 @@
<% if operator_hash.fetch("date", "all") == date %>
<% if operator_hash.fetch("date", "all") == date %>
<b><%= translate(locale, date) %></b>
<b><%= translate(locale, date) %></b>
<% else %>
<% else %>
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?date:[a-z]+/, "") + " date:" + date) %>&page=<%= pag e %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&date=<%= dat e %>">
<%= translate(locale, date) %>
<%= translate(locale, date) %>
</a>
</a>
<% end %>
<% end %>
@ -36,7 +35,7 @@
<% if operator_hash.fetch("content_type", "all") == content_type %>
<% if operator_hash.fetch("content_type", "all") == content_type %>
<b><%= translate(locale, content_type) %></b>
<b><%= translate(locale, content_type) %></b>
<% else %>
<% else %>
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?content_type:[a-z]+/, "") + " content_type:" + content_type) %>&page=<%= pag e %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&content_type=<%= content_typ e %>">
<%= translate(locale, content_type) %>
<%= translate(locale, content_type) %>
</a>
</a>
<% end %>
<% end %>
@ -51,7 +50,7 @@
<% if operator_hash.fetch("duration", "all") == duration %>
<% if operator_hash.fetch("duration", "all") == duration %>
<b><%= translate(locale, duration) %></b>
<b><%= translate(locale, duration) %></b>
<% else %>
<% else %>
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?duration:[a-z]+/, "") + " duration:" + duration) %>&page=<%= page %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&duration=<%= duration %>">
<%= translate(locale, duration) %>
<%= translate(locale, duration) %>
</a>
</a>
<% end %>
<% end %>
@ -66,11 +65,11 @@
<% if operator_hash.fetch("features", "all").includes?(feature) %>
<% if operator_hash.fetch("features", "all").includes?(feature) %>
<b><%= translate(locale, feature) %></b>
<b><%= translate(locale, feature) %></b>
<% elsif operator_hash.has_key?("features") %>
<% elsif operator_hash.has_key?("features") %>
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/features:/, "features:" + feature + ",")) %>&page=<%= page %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&features=<%= HTML.escape(operator_hash["features"] + ",#{feature}") %>">
<%= translate(locale, feature) %>
<%= translate(locale, feature) %>
</a>
</a>
<% else %>
<% else %>
<a href="/search?q=<%= HTML.escape(query.not_nil! + " features:" + feature) %>&page=<%= pag e %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&features=<%= featur e %>">
<%= translate(locale, feature) %>
<%= translate(locale, feature) %>
</a>
</a>
<% end %>
<% end %>
@ -85,7 +84,7 @@
<% if operator_hash.fetch("sort", "relevance") == sort %>
<% if operator_hash.fetch("sort", "relevance") == sort %>
<b><%= translate(locale, sort) %></b>
<b><%= translate(locale, sort) %></b>
<% else %>
<% else %>
<a href="/search?q=<%= HTML.escape(query.not_nil!.gsub(/ ?sort:[a-z]+/, "") + " sort:" + sort ) %>&page=<%= page %>">
<a href="/search?q=<%= HTML.escape(query.not_nil!) %>&page=<%= page %>&sort=<%= sort %>">
<%= translate(locale, sort) %>
<%= translate(locale, sort) %>
</a>
</a>
<% end %>
<% end %>