feat: add Navidrome client with Subsonic API sync #1

Merged
Mrixs merged 1 commits from navidrome-client into master 2026-05-21 06:50:15 +00:00
Owner

Add the Navidrome client module that connects to a Navidrome server via
the Subsonic API, fetches artist and album data, and syncs it into the
local SQLite database.

  • Add go-subsonic dependency for Subsonic API communication
  • Create internal/navidrome/client.go with NavidromeClient wrapper
    • NewClient constructor with token-based auth
    • Ping health check with HTTP status validation
    • GetArtists fetches all artists via getArtists endpoint
    • GetArtistAlbums fetches albums per artist via getArtist endpoint
  • Create internal/navidrome/sync.go with sync orchestration
    • SyncArtists upserts artists into artist_settings table
    • SyncAlbums fetches and stores albums for monitored artists
  • Add local_albums table (migration 003) with FK to artist_settings
  • Add LocalAlbum CRUD operations in internal/database/local_albums.go
  • Full test coverage: 19 tests across client and sync packages
  • All tests pass, go vet and go fmt clean
Add the Navidrome client module that connects to a Navidrome server via the Subsonic API, fetches artist and album data, and syncs it into the local SQLite database. - Add go-subsonic dependency for Subsonic API communication - Create internal/navidrome/client.go with NavidromeClient wrapper - NewClient constructor with token-based auth - Ping health check with HTTP status validation - GetArtists fetches all artists via getArtists endpoint - GetArtistAlbums fetches albums per artist via getArtist endpoint - Create internal/navidrome/sync.go with sync orchestration - SyncArtists upserts artists into artist_settings table - SyncAlbums fetches and stores albums for monitored artists - Add local_albums table (migration 003) with FK to artist_settings - Add LocalAlbum CRUD operations in internal/database/local_albums.go - Full test coverage: 19 tests across client and sync packages - All tests pass, go vet and go fmt clean
Mrixs added 1 commit 2026-05-21 06:49:39 +00:00
Add the Navidrome client module that connects to a Navidrome server via
the Subsonic API, fetches artist and album data, and syncs it into the
local SQLite database.

- Add go-subsonic dependency for Subsonic API communication
- Create internal/navidrome/client.go with NavidromeClient wrapper
  - NewClient constructor with token-based auth
  - Ping health check with HTTP status validation
  - GetArtists fetches all artists via getArtists endpoint
  - GetArtistAlbums fetches albums per artist via getArtist endpoint
- Create internal/navidrome/sync.go with sync orchestration
  - SyncArtists upserts artists into artist_settings table
  - SyncAlbums fetches and stores albums for monitored artists
- Add local_albums table (migration 003) with FK to artist_settings
- Add LocalAlbum CRUD operations in internal/database/local_albums.go
- Full test coverage: 19 tests across client and sync packages
- All tests pass, go vet and go fmt clean
Mrixs merged commit a31b4c4fe1 into master 2026-05-21 06:50:15 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mrixs/NaviWatcher#1