From 8e08f588bd59a2483be721d5664463535ed1d956 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 1 May 2026 12:49:18 +0300 Subject: Add cover image detection for audio files in scanner During scanning, when an audio file is found in a directory that also contains an image file (jpg/png/gif), the scanner now assigns that image as the audio file's thumbnail_path. This is common for audiobooks which have cover.jpg alongside the audio files. Changes: - scanner: two-pass walk to collect sibling images, then pair with audio - CSS: add .row-cover style for audio items with covers - JS: render audio rows with cover images when thumbnail_path is set --- web/js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'web/js/app.js') diff --git a/web/js/app.js b/web/js/app.js index 884cdcf..e4150ad 100644 --- a/web/js/app.js +++ b/web/js/app.js @@ -278,9 +278,12 @@ function renderItem(m, index) { `; } + const coverHtml = m.thumbnail_path + ? `` + : '🎵'; return `
- 🎵 + ${coverHtml}
${escapeHtml(m.file_name)}
${escapeHtml(m.codec || '')} ${m.bitrate ? Math.round(m.bitrate/1000)+'kbps' : ''} ${sizeText ? '• ' + sizeText : ''}
-- cgit v1.2.3