fix: associate artists with merged items

This commit is contained in:
Gabe Farrell 2025-06-15 22:25:55 -04:00
parent bf9b84a171
commit dc5dcbd474
6 changed files with 232 additions and 20 deletions

View file

@ -200,6 +200,16 @@ func (d *Psql) UpdateAlbum(ctx context.Context, opts db.UpdateAlbumOpts) error {
return err
}
}
if opts.VariousArtistsUpdate {
l.Debug().Msgf("Updating release with ID %d with image %s", opts.ID, opts.Image)
err := qtx.UpdateReleaseVariousArtists(ctx, repository.UpdateReleaseVariousArtistsParams{
ID: opts.ID,
VariousArtists: opts.VariousArtistsValue,
})
if err != nil {
return err
}
}
return tx.Commit(ctx)
}