From e1bfe1290341a70a2958af0a5ebcae80cb734c78 Mon Sep 17 00:00:00 2001 From: Caleb Allen Date: Sat, 21 Mar 2026 22:53:52 -0400 Subject: [PATCH] fix: register playCount column in backend AllColumnIDs + rename to 'Play Count' Backend validation rejected 'playCount' as unknown column ID, silently preventing it from being enabled or persisted. Added ColPlayCount to the tracklist package's constant list and AllColumnIDs slice. --- backend/tracklist/config.go | 2 ++ frontend/src/components/track-list/columns.ts | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/tracklist/config.go b/backend/tracklist/config.go index e6ae53a..c13e17d 100644 --- a/backend/tracklist/config.go +++ b/backend/tracklist/config.go @@ -33,6 +33,7 @@ const ( ColChannels ColumnID = "channels" ColBitrate ColumnID = "bitrate" ColFileSize ColumnID = "fileSize" + ColPlayCount ColumnID = "playCount" ) // AllColumnIDs lists every recognised column in default display @@ -54,6 +55,7 @@ var AllColumnIDs = []ColumnID{ ColChannels, ColBitrate, ColFileSize, + ColPlayCount, } // DefaultColumns is the initial column configuration matching the diff --git a/frontend/src/components/track-list/columns.ts b/frontend/src/components/track-list/columns.ts index 726b810..eeda875 100644 --- a/frontend/src/components/track-list/columns.ts +++ b/frontend/src/components/track-list/columns.ts @@ -188,10 +188,10 @@ export const COLUMN_DEFS: Record = { }, playCount: { id: 'playCount', - label: 'Plays', + label: 'Play Count', accessor: (t) => t.PlayCount ? String(t.PlayCount) : '', - defaultWidth: '60px', + defaultWidth: '80px', align: 'right', comparator: (a, b) => compareNum(a.PlayCount, b.PlayCount),