fix MR comments
This commit is contained in:
@@ -18,4 +18,8 @@ class BroadcastRecording < ApplicationRecord
|
|||||||
def download_file_name
|
def download_file_name
|
||||||
"#{broadcast_name}_Date_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%Y-%m-%d")}_Time_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%T")}".parameterize
|
"#{broadcast_name}_Date_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%Y-%m-%d")}_Time_#{created_at.in_time_zone(broadcast.shoot_location_time_zone).strftime("%T")}".parameterize
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def thumbnail_url(width = 300)
|
||||||
|
"https://image.mux.com/#{asset_playback_uid}/thumbnail.jpg?width=#{width}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<% if (controller.class.module_parent.to_s != "Public" && policy(BroadcastRecording).destroy?) %>
|
<% if (controller.class.module_parent.to_s != "Public" && policy(BroadcastRecording).destroy?) %>
|
||||||
<%= link_to "Hide", [broadcast.project, broadcast, recording], class: "btn-sm btn-primary ml-1 text-decoration-none", remote: true, method: :delete, data: { confirm: t('.confirm_hide') } %>
|
<%= link_to "Hide", [broadcast.project, broadcast, recording], class: "btn-sm btn-primary ml-1 text-decoration-none", remote: true, method: :delete, data: { confirm: t('.confirm_hide') } %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<img class="img-thumbnail img-fluid mt-2 mb-2" src="<%= "https://image.mux.com/#{recording.asset_playback_uid}/thumbnail.jpg?width=300" %>" alt="Recording preview">
|
<%= image_tag(recording.thumbnail_url, class: 'img-thumbnail img-fluid mt-2 mb-2') %>
|
||||||
</li>
|
</li>
|
||||||
<% end %>
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
Reference in New Issue
Block a user