summaryrefslogtreecommitdiffstats
path: root/views/album.erb
diff options
context:
space:
mode:
authorKen D'Ambrosio <ken@jots.org>2026-05-14 22:59:59 +0000
committerKen D'Ambrosio <ken@jots.org>2026-05-14 22:59:59 +0000
commitc76ea393777897e0c367e186d1a3b243193d8377 (patch)
treeb922795d65bcbea171ef6c2ddf6b3c80881123d2 /views/album.erb
parent6acd47c1ca27d705afe88b292a55a5170c038d2e (diff)
Hide transcoded originals from non-admins; mark them visually for admins
update.rb records transcoded_to in album.json (even on re-runs where the MP4 already exists) so the marker survives across scans. app.rb filters files with transcoded_to from non-admin views. album.erb renders them greyed-out with an amber "⚠ original" badge in admin mode. admin/album.erb marks the edit-table row and shows the target filename under the original. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'views/album.erb')
-rw-r--r--views/album.erb3
1 files changed, 2 insertions, 1 deletions
diff --git a/views/album.erb b/views/album.erb
index 8577bdb..64bf763 100644
--- a/views/album.erb
+++ b/views/album.erb
@@ -54,7 +54,7 @@
<div class="grid" id="photo-grid">
<% @entries.each_with_index do |e, i| %>
<% file_rel = @rel.empty? ? e[:name] : "#{@rel}/#{e[:name]}" %>
- <div class="card media-card<%= ' hidden-item' unless e[:visible] %>"
+ <div class="card media-card<%= ' hidden-item' unless e[:visible] %><%= ' unplayable-original' if e[:transcoded_to] %>"
data-index="<%= i %>"
data-type="<%= e[:type] %>"
data-src="/media/<%= file_rel %>"
@@ -66,6 +66,7 @@
<% if e[:type] == :video %><span class="type-badge video-badge">▶</span><% end %>
<% if e[:type] == :video && e[:duration] %><span class="duration-badge"><%= format_duration(e[:duration]) %></span><% end %>
<% if e[:type] == :audio %><span class="type-badge audio-badge">♪</span><% end %>
+ <% if e[:transcoded_to] %><span class="unplayable-badge">⚠ original</span><% end %>
</div>
<% if e[:caption] %>
<div class="card-meta"><p class="card-caption"><%= e[:caption] %></p></div>