fix(torrent): expand tracker list, add DHT persistence and configurable timeouts

- Expand default trackers from 5 to 31 (synced with web tracker-list.ts)
- Add DHT node persistence between sessions (~/.local/share/unarr/dht-nodes.txt)
  Saves known nodes on shutdown, restores on startup for warm DHT bootstrap
- Make metadata_timeout and stall_timeout configurable in config.toml
  Default: 0 (unlimited, like qBittorrent) — users can set custom values
- Fix CleanTitle to handle web domains and format patterns (e.g. pctfenix.com)
This commit is contained in:
Deivid Soto 2026-03-29 19:09:51 +02:00
parent 20d4d34dfc
commit 386c97f84a
7 changed files with 265 additions and 39 deletions

View file

@ -224,7 +224,7 @@ func (d *DebridDownloader) Download(ctx context.Context, task *Task, outputDir s
pct = int(float64(downloaded) / float64(totalBytes) * 100)
}
fmt.Fprintf(os.Stderr, "\r[%s] %d%% — %s/%s @ %s/s (debrid)",
log.Printf("[%s] %d%% — %s/%s @ %s/s (debrid)",
shortID(task.ID), pct,
formatBytes(downloaded), formatBytes(totalBytes), formatBytes(speed))
@ -254,7 +254,6 @@ func (d *DebridDownloader) Download(ctx context.Context, task *Task, outputDir s
}
}
fmt.Fprint(os.Stderr, "\r\033[2K") // clear progress line
log.Printf("[%s] debrid download complete: %s (%s)", shortID(task.ID), fileName, formatBytes(downloaded))
return &Result{