feat: add SyncAll periodic sync pipeline and wire Navidrome client into App
This commit is contained in:
@@ -95,10 +95,10 @@ name collisions.)
|
||||
- [x] run tests - must pass before task 3
|
||||
|
||||
### Task 3: Periodic sync pipeline
|
||||
- [ ] add `SyncAll(ctx, ndClient, mbClient, db, ttl)` orchestrator: for each monitored artist → ensure MBID (resolve + persist if missing) → `musicbrainz.SyncArtistDiscography` → `navidrome.SyncAlbums`
|
||||
- [ ] wire `navidrome.NewClient` into `App`; add `ndClient` field
|
||||
- [ ] write tests for `SyncAll` with stubbed clients + `:memory:` DB (new artist gets MBID, existing MBID reused, unmonitored skipped)
|
||||
- [ ] run tests - must pass before task 4
|
||||
- [x] add `SyncAll(ctx, ndClient, mbClient, db, ttl)` orchestrator: for each monitored artist → ensure MBID (resolve + persist if missing) → `musicbrainz.SyncArtistDiscography` → `navidrome.SyncAlbums`
|
||||
- [x] wire `navidrome.NewClient` into `App`; add `ndClient` field
|
||||
- [x] write tests for `SyncAll` with stubbed clients + `:memory:` DB (new artist gets MBID, existing MBID reused, unmonitored skipped)
|
||||
- [x] run tests - must pass before task 4
|
||||
|
||||
### Task 4: Main loop wiring (sync → scan)
|
||||
- [ ] replace compute-only `run()` with: one immediate sync+scan, then a ticker-driven periodic sync+scan goroutine; keep graceful shutdown via ctx
|
||||
|
||||
Reference in New Issue
Block a user