feat: fetch all artist albums with caching, filter by type in handler

- Provider fetches all release groups via paginated browse, no type filter
- Service caches all albums in DB, ensures referenced artists exist first
- Server handler filters by album_types (default: album|ep|single), excludes secondary types
- Add secondary_types to domain, DB schema, and MB types
- Add ErrBadRequest handling for MusicBrainz 400 errors
- Replace migrations with single schema.sql
- Add GetAllByArtistID and SaveAll to album repository
This commit is contained in:
Alexander
2026-05-07 20:03:04 +02:00
parent 35ac167952
commit 9f1318e79e
17 changed files with 302 additions and 172 deletions
+8
View File
@@ -39,10 +39,18 @@ func (r *noopAlbumRepo) GetByArtistID(ctx context.Context, artistID string, limi
return &domain.SearchResult[domain.Album]{}, nil
}
func (r *noopAlbumRepo) GetAllByArtistID(ctx context.Context, artistID string) ([]domain.Album, error) {
return nil, nil
}
func (r *noopAlbumRepo) Save(ctx context.Context, album *domain.Album) error {
return nil
}
func (r *noopAlbumRepo) SaveAll(ctx context.Context, albums []domain.Album) error {
return nil
}
type noopTrackRepo struct{}
func (r *noopTrackRepo) GetByID(ctx context.Context, id string) (*domain.Track, error) {