Fixed: Monitored status being reset after refresh when artist is edited manually

(cherry picked from commit 98b1a7681be36199283f36c692ed10ff30ded721)
pull/4361/head^2
Mark McDowall 6 years ago committed by Bogdan
parent 545e17de49
commit 82d1fc1a81

@ -224,9 +224,13 @@ namespace NzbDrone.Core.Music
public Artist UpdateArtist(Artist artist, bool publishUpdatedEvent = true)
{
_cache.Clear();
var storedArtist = GetArtist(artist.Id);
var updatedArtist = _artistRepository.Update(artist);
// Never update AddOptions when updating an artist, keep it the same as the existing stored artist.
artist.AddOptions = storedArtist.AddOptions;
var updatedArtist = _artistRepository.Update(artist);
if (publishUpdatedEvent)
{
_eventAggregator.PublishEvent(new ArtistEditedEvent(updatedArtist, storedArtist));

Loading…
Cancel
Save