Rename project to Navidrome

This commit is contained in:
Deluan 2020-01-23 19:44:08 -05:00
parent aaefc6bfc7
commit bee55c04c8
93 changed files with 210 additions and 203 deletions

View file

@ -3,14 +3,15 @@ package conf
import (
"os"
"github.com/cloudsonic/sonic-server/log"
"github.com/deluan/navidrome/consts"
"github.com/deluan/navidrome/log"
"github.com/koding/multiconfig"
)
type sonic struct {
Port string `default:"4533"`
MusicFolder string `default:"./music"`
DbPath string `default:"./data/cloudsonic.db"`
DbPath string `default:"./data/navidrome.db"`
LogLevel string `default:"info"`
IgnoredArticles string `default:"The El La Los Las Le Les Os As O A"`
@ -62,8 +63,8 @@ func LoadFromFile(tomlFile string) {
}
func LoadFromLocalFile() {
if _, err := os.Stat("./sonic.toml"); err == nil {
LoadFromFile("./sonic.toml")
if _, err := os.Stat(consts.LocalConfigFile); err == nil {
LoadFromFile(consts.LocalConfigFile)
}
}