Moved logic of collapsing songs into albums to model package
(it should really be called domain.... maybe will rename it later)
This commit is contained in:
@@ -17,7 +17,7 @@ import (
|
||||
"github.com/navidrome/navidrome/log"
|
||||
"github.com/navidrome/navidrome/model"
|
||||
"github.com/navidrome/navidrome/utils"
|
||||
"github.com/navidrome/navidrome/utils/math2"
|
||||
"github.com/navidrome/navidrome/utils/number"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -173,7 +173,7 @@ func (e *externalMetadata) SimilarSongs(ctx context.Context, id string, count in
|
||||
return ctx.Err()
|
||||
}
|
||||
|
||||
topCount := math2.Max(count, 20)
|
||||
topCount := number.Max(count, 20)
|
||||
topSongs, err := e.getMatchingTopSongs(ctx, e.ag, &auxArtist{Name: a.Name, Artist: a}, topCount)
|
||||
if err != nil {
|
||||
log.Warn(ctx, "Error getting artist's top songs", "artist", a.Name, err)
|
||||
|
||||
Reference in New Issue
Block a user