Save config, dummy out rand.Shuffle for now
This commit is contained in:
parent
7795ce0a73
commit
e1fa2f35f2
|
@ -53,7 +53,9 @@ func LoadConfig() *Config {
|
|||
filepath := configFile
|
||||
if _, err := os.Stat(filepath); os.IsNotExist(err) {
|
||||
log.Warn("No stored config file found (%s); loading default settings", filepath)
|
||||
return DefaultConfig()
|
||||
cfg := DefaultConfig()
|
||||
SaveConfig(cfg)
|
||||
return cfg
|
||||
}
|
||||
|
||||
fh, err := os.Open(filepath)
|
||||
|
|
7
music.go
7
music.go
|
@ -3,7 +3,6 @@ package sonar
|
|||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
|
@ -137,9 +136,9 @@ func (s *Sonar) StartPlaylist() error {
|
|||
|
||||
// Shuffle the files.
|
||||
log.Debug("StartPlaylist: shuffled %d media files", len(files))
|
||||
rand.Shuffle(len(files), func(i, j int) {
|
||||
files[i], files[j] = files[j], files[i]
|
||||
})
|
||||
// rand.Shuffle(len(files), func(i, j int) {
|
||||
// files[i], files[j] = files[j], files[i]
|
||||
// })
|
||||
|
||||
// Install the playlist and go.
|
||||
s.Player.Run(files)
|
||||
|
|
Loading…
Reference in New Issue
Block a user