Skip to content

🎧 Your Personal Streaming Service

fix(ui): sort playlist by `year`

Deluand331ee904b06
diff --git a/persistence/playlist_track_repository.go b/persistence/playlist_track_repository.go
index 69a2449c6..ea1977f3d 100644
--- a/persistence/playlist_track_repository.go
+++ b/persistence/playlist_track_repository.go
@@ -51,11 +51,13 @@ 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",
- "duration": "duration", // To make sure the field will be whitelisted
+ "id": "playlist_tracks.id",
+ "artist": "order_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",
},
"f") // TODO I don't like this solution, but I won't change it now as it's not the focus of BFR.