bump to Go 1.20 and rm deprecated rand.Seed

This commit is contained in:
Drew Weymouth
2023-12-19 17:59:24 -08:00
parent a16e687c02
commit 81dde8ee2e
3 changed files with 3 additions and 9 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package backend
import (
"context"
"log"
"math/rand"
"time"
"github.com/dweymouth/supersonic/backend/mediaprovider"
@@ -180,7 +181,7 @@ func (p *PlaybackManager) LoadTracks(tracks []*mediaprovider.Track, appendToQueu
}
nums := util.Range(len(tracks))
if shuffle {
util.ShuffleSlice(nums)
rand.Shuffle(len(nums), func(i, j int) { nums[i], nums[j] = nums[j], nums[i] })
}
for _, i := range nums {
url, err := p.sm.Server.GetStreamURL(tracks[i].ID, p.transcodeCfg.ForceRawFile)