Search now includes comments

This commit is contained in:
patben8 committed 2026-10-05 23:16:12 +02:00
1 parent c8b86100f0
commit 9f79f5a849
4 files changed
+11 -2

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ function applyFilters(tracks: Track[], f: Filters): Track[] {
const bpmMax = f.bpmMax ? parseFloat(f.bpmMax) : null
return tracks.filter((t) => {
if (q) {
const hay = `${t.artist ?? ''} ${t.title ?? ''} ${t.album ?? ''}`.toLowerCase()
const hay = [t.artist, t.title, t.album, t.comment, t.comment2].filter(Boolean).join(' ').toLowerCase()
if (!hay.includes(q)) return false
}
if (f.genre && t.genre !== f.genre) return false
+1 -1
View File
@@ -59,7 +59,7 @@ export function Toolbar({
value={filters.search}
onChange={(e) => set({ search: e.target.value })}
ref={searchRef}
placeholder="Search artist, title, album…"
placeholder="Artist, title, album, comment…"
className="well w-72 rounded-full py-1.5 pl-9 pr-8 text-sm text-text outline-none placeholder:text-faint focus:ring-1 focus:ring-accent"
/>
{filters.search && (