From e38a690632c3cb5ba223145f34ec49e14f701a43 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 23 May 2023 09:51:02 -0400 Subject: [PATCH] Order albums by full original date (this time is for real). Fixes #1452 --- persistence/album_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistence/album_repository.go b/persistence/album_repository.go index c4229389c..08e7e17aa 100644 --- a/persistence/album_repository.go +++ b/persistence/album_repository.go @@ -27,7 +27,7 @@ func NewAlbumRepository(ctx context.Context, o orm.QueryExecutor) model.AlbumRep "name": "order_album_name asc, order_album_artist_name asc", "artist": "compilation asc, order_album_artist_name asc, order_album_name asc", "random": "RANDOM()", - "max_year": "max_year, coalesce(nullif(original_date, ''), nullif(release_date, '')), name, order_album_name asc", + "max_year": "coalesce(nullif(original_date,''), cast(max_year as text)), release_date, name, order_album_name asc", "recently_added": recentlyAddedSort(), } r.filterMappings = map[string]filterFunc{