Refactor random functions
This commit is contained in:
+2
-2
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/navidrome/navidrome/utils/number"
|
||||
"github.com/navidrome/navidrome/utils/random"
|
||||
)
|
||||
|
||||
type Share struct {
|
||||
@@ -42,7 +42,7 @@ func (s Share) CoverArtID() ArtworkID {
|
||||
case "artist":
|
||||
return Artist{ID: ids[0]}.CoverArtID()
|
||||
}
|
||||
rnd := number.RandomInt64(int64(len(s.Tracks)))
|
||||
rnd := random.Int64(int64(len(s.Tracks)))
|
||||
return s.Tracks[rnd].CoverArtID()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user