<%= @storage_location.name %>

Path: <%= @storage_location.path %>

<%= link_to "← Back to Library", storage_locations_path, class: "bg-gray-600 hover:bg-gray-700 text-white font-medium py-2 px-4 rounded-lg transition-colors" %> <%= form_with(url: scan_storage_location_path(@storage_location), method: :post, class: "inline-flex") do |form| %> <%= form.submit "Scan for Videos", class: "bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg cursor-pointer transition-colors" %> <% end %>
<% if @videos.empty? %>
No videos found

This storage location doesn't contain any video files yet. Try scanning for videos to add them to your library.

<% else %>

Videos (<%= @videos.count %>)

<% @videos.each do |video| %>
<% if video.video_assets.where(asset_type: 'thumbnail').any? %> <%= image_tag video.video_assets.where(asset_type: 'thumbnail').first.file, class: "w-24 h-16 object-cover rounded", alt: video.display_title %> <% else %>
<% end %>

<%= link_to video.display_title, video, class: "hover:text-blue-600 transition-colors" %>

Duration: <%= video.format_duration %> Resolution: <%= video.resolution_label %> Size: <%= number_to_human_size(video.video_metadata['file_size']) rescue "Unknown" %>
<% if video.web_compatible? %> Web Compatible <% else %> Needs Transcoding <% end %> <% if video.processed? %> Processed <% else %> Processing <% end %> <% if video.work&.title && video.work.title != video.display_title %> Part of: <%= link_to video.work.title, video.work, class: "hover:text-blue-600 transition-colors" %> <% end %>
<%= link_to "Watch", video, class: "bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded transition-colors" %>
<% end %>
<% end %>