mirror of
https://github.com/lidarr/Lidarr
synced 2025-02-24 06:50:43 +00:00
Fixed: Monitored status being reset after refresh when artist is edited manually
(cherry picked from commit 98b1a7681be36199283f36c692ed10ff30ded721)
This commit is contained in:
parent
545e17de49
commit
82d1fc1a81
1 changed files with 6 additions and 2 deletions
|
@ -224,9 +224,13 @@ public void RemoveAddOptions(Artist artist)
|
|||
public Artist UpdateArtist(Artist artist, bool publishUpdatedEvent = true)
|
||||
{
|
||||
_cache.Clear();
|
||||
var storedArtist = GetArtist(artist.Id);
|
||||
var updatedArtist = _artistRepository.Update(artist);
|
||||
|
||||
var storedArtist = GetArtist(artist.Id);
|
||||
|
||||
// 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…
Reference in a new issue