Rename struct
This commit is contained in:
@@ -27,7 +27,8 @@ func MainApp(configPath string) {
|
||||
utils.EnsureDirExists("logs") // Ensure the logs directory exists
|
||||
logPath := fmt.Sprintf("logs/zurg-%s.log", time.Now().Format(time.DateOnly))
|
||||
log := logutil.NewLogger(logPath)
|
||||
zurglog := log.Named("zurg")
|
||||
|
||||
zurglog := log.Named("zurg") // logger for this main function
|
||||
|
||||
zurglog.Debugf("PID: %d", os.Getpid())
|
||||
zurglog.Infof("Version: %s", version.GetVersion())
|
||||
|
||||
@@ -43,11 +43,11 @@ func (z *ZurgConfigV1) GetDirectories() []string {
|
||||
return rootDirectories
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) GetDirectoryConfig(directory string) Directory {
|
||||
func (z *ZurgConfigV1) GetDirectoryConfig(directory string) DirectoryV1 {
|
||||
if dirCfg, ok := z.Directories[directory]; ok {
|
||||
return *dirCfg
|
||||
}
|
||||
return Directory{}
|
||||
return DirectoryV1{}
|
||||
}
|
||||
|
||||
func (z *ZurgConfigV1) GetGroupMap() map[string][]string {
|
||||
|
||||
@@ -4,10 +4,11 @@ import "github.com/debridmediamanager/zurg/pkg/logutil"
|
||||
|
||||
type ZurgConfigV1 struct {
|
||||
ZurgConfig `yaml:",inline"`
|
||||
Directories map[string]*Directory `yaml:"directories"`
|
||||
Directories map[string]*DirectoryV1 `yaml:"directories"`
|
||||
log *logutil.Logger
|
||||
}
|
||||
type Directory struct {
|
||||
|
||||
type DirectoryV1 struct {
|
||||
GroupOrder int `yaml:"group_order"`
|
||||
Group string `yaml:"group"`
|
||||
Filters []*FilterConditionsV1 `yaml:"filters"`
|
||||
|
||||
Reference in New Issue
Block a user