feat(library): add concurrent read-only scanner with progress events

- feat(library): walk each root, plan the changes, read tags with N parallel
  workers and write from a single goroutine
- feat(library): detect renames by size and mtime only when the match is
  unambiguous; mark vanished files missing instead of deleting them
- fix-safe: an unreadable root, an unreadable subdirectory or an interrupted
  scan never marks files as missing; symlinks are skipped
- feat(library): event hub that fans scan progress out to subscribers without
  ever blocking the scan (ready for a websocket client)
- feat(library): TagLib (WASM, no CGO) reader for MP3 and FLAC tags and
  audio properties, with title and artist fallbacks
- feat(storage): library repository for SQLite and PostgreSQL
- feat(api): POST/GET /api/v1/library/scan to start a scan and read its status
- feat(config): library.scan_workers
This commit is contained in:
tgiachi 2026-11-11 12:16:45 +01:00
commit 4c7e99bd6a

2
go.mod
View file

@ -10,6 +10,7 @@ require (
github.com/uptrace/bun v1.3.0
github.com/uptrace/bun/dialect/pgdialect v1.3.0
github.com/uptrace/bun/dialect/sqlitedialect v1.3.0
go.senan.xyz/taglib v0.15.0
go.uber.org/zap v1.28.0
golang.org/x/crypto v0.58.0
modernc.org/sqlite v1.62.0
@ -44,6 +45,7 @@ require (
github.com/quic-go/qpack v0.6.0 // indirect
github.com/quic-go/quic-go v0.59.0 // indirect
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
github.com/tetratelabs/wazero v1.11.1-0.20260428013916-2bbd517b7633 // indirect
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.3.1 // indirect