mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-03-16.git
synced 2024-08-15 00:53:18 +00:00
parent
69b316e708
commit
d2d755a692
4 changed files with 10 additions and 7 deletions
|
@ -412,8 +412,9 @@
|
||||||
"playlist": "Playlist",
|
"playlist": "Playlist",
|
||||||
"movie": "Movie",
|
"movie": "Movie",
|
||||||
"show": "Show",
|
"show": "Show",
|
||||||
"short": "Short (< 4 minutes)",
|
"search_filters_duration_short": "Under 4 minutes",
|
||||||
"long": "Long (> 20 minutes)",
|
"search_filters_duration_between": "4 - 20 minutes",
|
||||||
|
"search_filters_duration_long": "Over 20 minutes",
|
||||||
"hd": "HD",
|
"hd": "HD",
|
||||||
"subtitles": "Subtitles/CC",
|
"subtitles": "Subtitles/CC",
|
||||||
"creative_commons": "Creative Commons",
|
"creative_commons": "Creative Commons",
|
||||||
|
|
|
@ -91,10 +91,12 @@ def produce_search_params(page = 1, sort : String = "relevance", date : String =
|
||||||
end
|
end
|
||||||
|
|
||||||
case duration
|
case duration
|
||||||
when "short"
|
when "search_filters_duration_short"
|
||||||
object["2:embedded"].as(Hash)["3:varint"] = 1_i64
|
object["2:embedded"].as(Hash)["3:varint"] = 1_i64
|
||||||
when "long"
|
when "search_filters_duration_long"
|
||||||
object["2:embedded"].as(Hash)["3:varint"] = 2_i64
|
object["2:embedded"].as(Hash)["3:varint"] = 2_i64
|
||||||
|
when "search_filters_duration_between"
|
||||||
|
object["2:embedded"].as(Hash)["3:varint"] = 3_i64
|
||||||
else nil # Ignore
|
else nil # Ignore
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<% if operators.fetch(filter_name, selected_default) == filter %>
|
<% if operators.fetch(filter_name, selected_default) == filter %>
|
||||||
<% if allow_removal %>
|
<% if allow_removal %>
|
||||||
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&#{filter_name}=[a-z]+/, "")}"%>">
|
<a style="color: inherit;" href="<%= base_url + "#{filter_params.gsub(/&#{filter_name}=[a-z_]+/, "")}"%>">
|
||||||
<b><%= translate(locale, filter) %></b>
|
<b><%= translate(locale, filter) %></b>
|
||||||
<i class="remove-filter icon ion-md-close"></i>
|
<i class="remove-filter icon ion-md-close"></i>
|
||||||
</a>
|
</a>
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
<b><%= translate(locale, filter) %></b>
|
<b><%= translate(locale, filter) %></b>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="<%= base_url + "#{filter_params.gsub(/&#{filter_name}=[a-z]+/, "")}&#{filter_name}=#{filter}"%>">
|
<a href="<%= base_url + "#{filter_params.gsub(/&#{filter_name}=[a-z_]+/, "")}&#{filter_name}=#{filter}"%>">
|
||||||
<%= translate(locale, filter) %>
|
<%= translate(locale, filter) %>
|
||||||
</a>
|
</a>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<% filter_name = "content_type" %>
|
<% filter_name = "content_type" %>
|
||||||
<%= rendered "components/search-filters/filter-column" -%>
|
<%= rendered "components/search-filters/filter-column" -%>
|
||||||
|
|
||||||
<% filters = ["short", "long"] %>
|
<% filters = ["search_filters_duration_short", "search_filters_duration_between", "search_filters_duration_long"] %>
|
||||||
<% filter_name = "duration" %>
|
<% filter_name = "duration" %>
|
||||||
<%= rendered "components/search-filters/filter-column" -%>
|
<%= rendered "components/search-filters/filter-column" -%>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue