diff options
| author | Ken D'Ambrosio <ken@jots.org> | 2026-05-12 17:26:06 +0000 |
|---|---|---|
| committer | Ken D'Ambrosio <ken@jots.org> | 2026-05-12 17:26:06 +0000 |
| commit | d58a77164dc37c445bc275d0bee5dbc7f06d7e7d (patch) | |
| tree | 495bde32ae4018f6cdcc9c850b0ce4d4c5f6c4f3 /app.rb | |
| parent | d006bb0d911c6ce08a20e2c10e30785ad559b439 (diff) | |
Show slideshow button for folders with media anywhere in hierarchy
- slideshow_view now uses all_media_entries for non-root dirs so the
slideshow traverses sub-albums instead of only direct files
- album.erb condition simplified: show launcher when albums OR media
entries exist (previously hidden for folders with only sub-albums)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app.rb')
| -rw-r--r-- | app.rb | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -342,9 +342,7 @@ def slideshow_view(rel) top_dirs = params[:dirs]&.split(',')&.map(&:strip)&.reject(&:empty?) all_media_entries(top_dirs: top_dirs&.any? ? top_dirs : nil) else - album_files(dir, data) - .select { |e| %i[image video].include?(e[:type]) } - .map { |e| e.merge(file_rel: "#{rel}/#{e[:name]}") } + all_media_entries(top_dirs: [rel]) end erb :slideshow, layout: false end |
