feat: add edit artist endpoint (section 1.4)
- Add GET/PUT /api/artists/{id} for artist settings
- Update sync to create artists table entry (library settings)
- Support partial updates for monitored, path, quality/metadata profiles
- Add e2e tests for get, edit, partial update flows
This commit is contained in:
@@ -101,6 +101,10 @@ func Sync(
|
||||
idStr := id.String()
|
||||
artistMetadataID = &idStr
|
||||
log.Info().Str("artist", artist.Name).Str("id", idStr).Msg("stored artist metadata")
|
||||
|
||||
if _, err := db.UpsertArtist(ctx, id); err != nil {
|
||||
log.Warn().Err(err).Str("artist", artist.Name).Msg("failed to create artist library entry")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -306,7 +310,7 @@ func RefreshArtist(
|
||||
return nil, &NotFoundError{Message: "database not available"}
|
||||
}
|
||||
|
||||
existingArtist, err := db.GetArtistByForeignID(ctx, foreignArtistID)
|
||||
existingArtist, err := db.GetArtistMetadataByForeignID(ctx, foreignArtistID)
|
||||
if err != nil {
|
||||
return nil, &NotFoundError{Message: "artist not found: " + foreignArtistID}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user