feat(daemon): add auto-scan, force start, and stall timeout default
- Auto-scan: daemon scans library daily (configurable via config.toml) [library] auto_scan = true, scan_interval = "24h" - Force start: tasks with forceStart=true bypass concurrency semaphore (like Transmission's Force Start — opens temporary extra slot) - Stall timeout default: 30m instead of unlimited, prevents dead torrents from permanently blocking download slots - ForceStart field in agent.Task for CLI/server communication
This commit is contained in:
parent
386c97f84a
commit
c476bd865c
5 changed files with 167 additions and 6 deletions
|
|
@ -68,10 +68,12 @@ type GeneralConfig struct {
|
|||
}
|
||||
|
||||
type LibraryConfig struct {
|
||||
ScanPath string `toml:"scan_path"` // remembered from last scan
|
||||
Workers int `toml:"workers"` // concurrent ffprobe (default 8)
|
||||
FFprobePath string `toml:"ffprobe_path"` // optional explicit path
|
||||
BackupDir string `toml:"backup_dir"` // for replaced files
|
||||
ScanPath string `toml:"scan_path"` // remembered from last scan
|
||||
Workers int `toml:"workers"` // concurrent ffprobe (default 8)
|
||||
FFprobePath string `toml:"ffprobe_path"` // optional explicit path
|
||||
BackupDir string `toml:"backup_dir"` // for replaced files
|
||||
AutoScan bool `toml:"auto_scan"` // enable daily auto-scan in daemon (default true)
|
||||
ScanInterval string `toml:"scan_interval"` // e.g. "24h", "12h", "6h" (default "24h")
|
||||
}
|
||||
|
||||
// Default returns a Config with sensible defaults.
|
||||
|
|
@ -98,6 +100,11 @@ func Default() Config {
|
|||
Country: "US",
|
||||
Locale: "en",
|
||||
},
|
||||
Library: LibraryConfig{
|
||||
AutoScan: true,
|
||||
ScanInterval: "24h",
|
||||
Workers: 8,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue