mirror of
https://github.com/navidrome/navidrome.git
synced 2026-10-14 13:27:09 +02:00
Extract metadata from files in a directory in batch (one call to ffmpeg for all files)
This commit is contained in:
parent
d9ce6f3b51
commit
c42e1bd2f5
7 changed files with 139 additions and 232 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/cloudsonic/sonic-server/conf"
|
||||
"github.com/cloudsonic/sonic-server/consts"
|
||||
"github.com/cloudsonic/sonic-server/log"
|
||||
"github.com/cloudsonic/sonic-server/model"
|
||||
|
|
@ -50,14 +51,18 @@ func createDefaultUser(ds model.DataStore) error {
|
|||
}
|
||||
if c == 0 {
|
||||
id, _ := uuid.NewRandom()
|
||||
initialPassword, _ := uuid.NewRandom()
|
||||
random, _ := uuid.NewRandom()
|
||||
initialPassword := random.String()
|
||||
if conf.Sonic.DevInitialPassword != "" {
|
||||
initialPassword = conf.Sonic.DevInitialPassword
|
||||
}
|
||||
log.Warn("Creating initial user. Please change the password!", "user", consts.InitialUserName, "password", initialPassword)
|
||||
initialUser := model.User{
|
||||
ID: id.String(),
|
||||
UserName: consts.InitialUserName,
|
||||
Name: consts.InitialName,
|
||||
Email: "",
|
||||
Password: initialPassword.String(),
|
||||
Password: initialPassword,
|
||||
IsAdmin: true,
|
||||
}
|
||||
err := ds.User().Put(&initialUser)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue