Remove download mount config, it is now always enabled

This commit is contained in:
Ben Sarmiento
2024-05-25 15:11:11 +02:00
parent 2f777f63e9
commit 264d62d0dc
8 changed files with 39 additions and 82 deletions

View File

@@ -24,8 +24,11 @@ import (
)
func MainApp(configPath string) {
utils.EnsureDirExists("logs") // Ensure the logs directory exists
logPath := fmt.Sprintf("logs/zurg-%s.log", time.Now().Format(time.DateOnly))
utils.EnsureDirExists("logs") // log files
utils.EnsureDirExists("data") // cache files (info, bins, etc.)
utils.EnsureDirExists("dump") // "zurgtorrent" files
logPath := fmt.Sprintf("logs/zurg-%s-%s.log", time.Now().Format(time.DateOnly), time.Now().Format(time.TimeOnly))
log := logutil.NewLogger(logPath)
zurglog := log.Named("zurg") // logger for this main function
@@ -36,7 +39,7 @@ func MainApp(configPath string) {
zurglog.Infof("BuiltAt: %s", version.GetBuiltAt())
if log.Level() == zapcore.DebugLevel {
zurglog.Infof("Debug logging is enabled; if you are not debugging please set LOG_LEVEL=info in your environment")
zurglog.Infof("Debug logging is enabled; if you are not debugging please set LOG_LEVEL=info in your system environment")
}
config, configErr := config.LoadZurgConfig(configPath, log.Named("config"))
@@ -92,8 +95,6 @@ func MainApp(configPath string) {
}
defer workerPool.Release()
utils.EnsureDirExists("data") // Ensure the data directory exists
utils.EnsureDirExists("dump") // dump is a new directory for "torrent" files
torrentMgr := torrent.NewTorrentManager(
config,
api,