<% content_for :title, "Videos" %>

Video Library

<% if @storage_locations.any? %> <% end %> <%= link_to "New Storage Location", new_admin_storage_location_path, class: "bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium" %>
<% if @videos.any? %>
<% @videos.each do |video| %>
<%# Placeholder for thumbnails - Phase 1C will add actual thumbnails %>
<%# Badge for source type %>
<%= video.storage_location.name %>

<%= link_to video.display_title, video_path(video), class: "hover:text-blue-600" %>

Duration: <%= video.formatted_duration %>
Size: <%= video.formatted_file_size %>
<% if video.resolution_label.present? %>
Resolution: <%= video.resolution_label %>
<% end %>
<% if video.processing_errors.present? %> Failed <% elsif video.processed? %> Processed <% else %> Processing <% end %>
<%= link_to "Watch", video_path(video), class: "bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-xs" %>
<% end %>
<%== pagy_nav(@pagy) %> <% else %>

No videos found

Get started by adding a storage location and scanning for videos.

<%= link_to "Add Storage Location", new_admin_storage_location_path, class: "mt-4 bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md text-sm font-medium" %>
<% end %>