From 651ce163c70fee1141b3d75aea289ca54655bb3e Mon Sep 17 00:00:00 2001 From: Deluan Date: Mon, 24 Mar 2025 16:41:54 -0400 Subject: [PATCH] fix(ui): sort playlist by `album_artist`, `bpm` and `channels` fix #3878 Signed-off-by: Deluan --- persistence/playlist_track_repository.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/persistence/playlist_track_repository.go b/persistence/playlist_track_repository.go index ea1977f3d..d33bd5113 100644 --- a/persistence/playlist_track_repository.go +++ b/persistence/playlist_track_repository.go @@ -51,13 +51,16 @@ func (r *playlistRepository) Tracks(playlistId string, refreshSmartPlaylist bool }) p.setSortMappings( map[string]string{ - "id": "playlist_tracks.id", - "artist": "order_artist_name", - "album": "order_album_name, order_album_artist_name", - "title": "order_title", + "id": "playlist_tracks.id", + "artist": "order_artist_name", + "album_artist": "order_album_artist_name", + "album": "order_album_name, order_album_artist_name", + "title": "order_title", // To make sure these fields will be whitelisted "duration": "duration", "year": "year", + "bpm": "bpm", + "channels": "channels", }, "f") // TODO I don't like this solution, but I won't change it now as it's not the focus of BFR.