feat(hls): persistent fMP4 segment cache + integrity + stats (0.9.7)
Cache keyed by sha256(absPath|quality|audioIdx)[:8] with .complete marker; LRU + size-budget eviction; per-key writer-lock; pinned during play; startup orphan reap; integrity verify on HIT; subtitle-completeness gate; hit/miss counters + daily log line. New [downloads.hls_cache] block in config.toml (enabled/size_gb/dir, default 5GB). Smoke test: 2nd play of same source+quality is 23-31× faster (HIT path skips ffmpeg entirely).
This commit is contained in:
parent
834c58c25a
commit
7e96976257
10 changed files with 1295 additions and 9 deletions
|
|
@ -28,6 +28,7 @@ type DaemonConfig struct {
|
|||
ScanPaths []string // configured scan paths for file deletion validation
|
||||
HWAccel string // detected encoder backend ("nvenc"/"qsv"/"vaapi"/"videotoolbox"/"none")
|
||||
MaxTranscodeHeight int // resolution cap the agent can transcode comfortably (px)
|
||||
AutoUpgrade bool // honor server-flagged upgrades by downloading + restarting (default: true)
|
||||
}
|
||||
|
||||
// Daemon manages agent registration and the sync loop.
|
||||
|
|
@ -237,6 +238,10 @@ func (d *Daemon) Run(ctx context.Context) error {
|
|||
return
|
||||
}
|
||||
d.lastNotifiedVersion = version
|
||||
if !d.cfg.AutoUpgrade {
|
||||
log.Printf("[upgrade] new version available: %s — auto_upgrade=false, run `unarr update` to apply", version)
|
||||
return
|
||||
}
|
||||
log.Printf("[upgrade] new version available: %s — applying auto-upgrade", version)
|
||||
go d.applyAutoUpgrade(version)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue