forked from External/greenlight
Added env variable to exclude recording formats from public recordings (#2055)
This commit is contained in:
parent
3de60daf85
commit
99c7262971
|
@ -54,4 +54,9 @@ module RoomsHelper
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Array of recording formats not to show for public recordings
|
||||||
|
def hidden_format_public
|
||||||
|
ENV.fetch("HIDDEN_FORMATS_PUBLIC", "").split(",")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -55,9 +55,10 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<% sorted_formats = recording[:playbacks].sort_by! {|p| p[:type]} %>
|
<% sorted_formats = recording[:playbacks].sort_by! {|p| p[:type]} %>
|
||||||
<% p = recording[:playbacks].find do |p| p.key?(:length) end %>
|
<% p = recording[:playbacks].find do |p| p.key?(:length) end %>
|
||||||
<% sorted_formats.each do |p| %>
|
<% sorted_formats.each do |p| %>
|
||||||
|
<% next if hidden_format_public.include?(p[:type].downcase)%>
|
||||||
<%= link_to t("recording.format.#{p[:type]}"), p[:url], class: "btn btn-sm btn-primary", target: "_blank" %>
|
<%= link_to t("recording.format.#{p[:type]}"), p[:url], class: "btn btn-sm btn-primary", target: "_blank" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
|
|
Loading…
Reference in New Issue