Bump golang.org/x/exp version

This commit is contained in:
Deluan 2024-02-16 20:43:12 -05:00
parent 7167e5ac87
commit 58f64355c2
5 changed files with 27 additions and 27 deletions

View file

@ -1,6 +1,7 @@
package model
import (
"cmp"
"time"
"github.com/navidrome/navidrome/utils/slice"
@ -95,7 +96,7 @@ func (als Albums) ToAlbumArtist() Artist {
a.Genres = append(a.Genres, al.Genres...)
mbzArtistIds = append(mbzArtistIds, al.MbzAlbumArtistID)
}
slices.SortFunc(a.Genres, func(a, b Genre) bool { return a.ID < b.ID })
slices.SortFunc(a.Genres, func(a, b Genre) int { return cmp.Compare(a.ID, b.ID) })
a.Genres = slices.Compact(a.Genres)
a.MbzArtistID = slice.MostFrequent(mbzArtistIds)

View file

@ -1,6 +1,7 @@
package model
import (
"cmp"
"encoding/json"
"mime"
"path/filepath"
@ -182,9 +183,8 @@ func (mfs MediaFiles) ToAlbum() Album {
a.MinYear, a.MaxYear = minMax(years)
a.MinOriginalYear, a.MaxOriginalYear = minMax(originalYears)
a.Comment, _ = allOrNothing(comments)
a.Comment, _ = allOrNothing(comments)
a.Genre = slice.MostFrequent(a.Genres).Name
slices.SortFunc(a.Genres, func(a, b Genre) bool { return a.ID < b.ID })
slices.SortFunc(a.Genres, func(a, b Genre) int { return cmp.Compare(a.ID, b.ID) })
a.Genres = slices.Compact(a.Genres)
a.FullText = " " + utils.SanitizeStrings(fullText...)
a = fixAlbumArtist(a, albumArtistIds)