From c76ea393777897e0c367e186d1a3b243193d8377 Mon Sep 17 00:00:00 2001 From: Ken D'Ambrosio Date: Thu, 14 May 2026 22:59:59 +0000 Subject: Hide transcoded originals from non-admins; mark them visually for admins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- app.rb | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'app.rb') diff --git a/app.rb b/app.rb index af18d44..ff7740c 100644 --- a/app.rb +++ b/app.rb @@ -90,20 +90,22 @@ helpers do entries = files.filter_map do |name| meta = (data['files'] || {})[name] || {} next if meta['visible'] == false && !admin? + next if meta['transcoded_to'] && !admin? { - name: name, - title: meta['title'] || name, - caption: meta['caption'], - visible: meta.fetch('visible', true), - type: media_type_for(name), - taken_at: meta['taken_at'], - width: meta['width'], - height: meta['height'], - duration: meta['duration'], - camera: meta['camera'], - aperture: meta['aperture'], - shutter: meta['shutter'], - iso: meta['iso'], + name: name, + title: meta['title'] || name, + caption: meta['caption'], + visible: meta.fetch('visible', true), + type: media_type_for(name), + taken_at: meta['taken_at'], + width: meta['width'], + height: meta['height'], + duration: meta['duration'], + camera: meta['camera'], + aperture: meta['aperture'], + shutter: meta['shutter'], + iso: meta['iso'], + transcoded_to: meta['transcoded_to'], } end -- cgit v1.2.3