From 97d95ea7942d34d1079828ac56aae0b799c50a82 Mon Sep 17 00:00:00 2001 From: Deluan Date: Thu, 19 Mar 2020 15:02:11 -0400 Subject: [PATCH] fix: group compilations together in the restful API. fix #93 --- persistence/album_repository.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/persistence/album_repository.go b/persistence/album_repository.go index 5df75cb8b..034159c32 100644 --- a/persistence/album_repository.go +++ b/persistence/album_repository.go @@ -20,6 +20,10 @@ func NewAlbumRepository(ctx context.Context, o orm.Ormer) model.AlbumRepository r.ctx = ctx r.ormer = o r.tableName = "album" + r.sortMappings = map[string]string{ + "artist": "compilation asc, album_artist asc, name asc", + } + return r }