Rename env vars prefix to ND_

This commit is contained in:
Deluan
2020-01-24 01:29:31 -05:00
parent d48ddacaba
commit bff6f3a4bd
18 changed files with 42 additions and 42 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ type artistRepository struct {
func NewArtistRepository(o orm.Ormer) model.ArtistRepository {
r := &artistRepository{}
r.ormer = o
r.indexGroups = utils.ParseIndexGroups(conf.Sonic.IndexGroups)
r.indexGroups = utils.ParseIndexGroups(conf.Server.IndexGroups)
r.tableName = "artist"
return r
}
+1 -1
View File
@@ -15,7 +15,7 @@ func NewMediaFolderRepository(o orm.Ormer) model.MediaFolderRepository {
}
func (*mediaFolderRepository) GetAll() (model.MediaFolders, error) {
mediaFolder := model.MediaFolder{ID: "0", Path: conf.Sonic.MusicFolder}
mediaFolder := model.MediaFolder{ID: "0", Path: conf.Server.MusicFolder}
mediaFolder.Name = "Music Library"
result := make(model.MediaFolders, 1)
result[0] = mediaFolder
+2 -2
View File
@@ -27,7 +27,7 @@ type SQLStore struct {
func New() model.DataStore {
once.Do(func() {
dbPath := conf.Sonic.DbPath
dbPath := conf.Server.DbPath
if dbPath == ":memory:" {
dbPath = "file::memory:?cache=shared"
}
@@ -114,7 +114,7 @@ func (db *SQLStore) getOrmer() orm.Ormer {
}
func initORM(dbPath string) error {
verbose := conf.Sonic.LogLevel == "trace"
verbose := conf.Server.LogLevel == "trace"
orm.Debug = verbose
if strings.Contains(dbPath, "postgres") {
driver = "postgres"
+3 -3
View File
@@ -60,9 +60,9 @@ func P(path string) string {
var _ = Describe("Initialize test DB", func() {
BeforeSuite(func() {
//log.SetLevel(log.LevelTrace)
//conf.Sonic.DbPath, _ = ioutil.TempDir("", "navidrome_tests")
//os.MkdirAll(conf.Sonic.DbPath, 0700)
conf.Sonic.DbPath = ":memory:"
//conf.Server.DbPath, _ = ioutil.TempDir("", "navidrome_tests")
//os.MkdirAll(conf.Server.DbPath, 0700)
conf.Server.DbPath = ":memory:"
ds := New()
artistRepo := ds.Artist()
for _, a := range testArtists {