Discussion #485: use SortName when sorting artist's albums by name

This commit is contained in:
Drew Weymouth
2026-01-25 09:00:28 -08:00
parent e6127ccc11
commit d681d87b31
5 changed files with 12 additions and 4 deletions
+7 -1
View File
@@ -276,7 +276,13 @@ func (a *ArtistPage) sortAlbumsSlices(slices ...[]*mediaprovider.Album) {
}
case discographySorts[2]: /*name*/
sortFunc = func(x, y int) bool {
return curSlice[x].Name < curSlice[y].Name
sortStr := func(a *mediaprovider.Album) string {
if a.SortName != "" {
return a.SortName
}
return a.Name
}
return sortStr(curSlice[x]) < sortStr(curSlice[y])
}
}