Fixed: Metadata files not being created after rescan

(cherry picked from commit e2ff089232765b876719b324e0543441e0bd1521)
This commit is contained in:
Mark McDowall 2020-09-30 22:37:45 +01:00 committed by Qstick
parent 2982478dba
commit a085dd38a6
3 changed files with 12 additions and 11 deletions

View File

@ -290,7 +290,10 @@ namespace Lidarr.Api.V1.Artist
public void Handle(MediaCoversUpdatedEvent message)
{
BroadcastResourceChange(ModelAction.Updated, GetArtistResource(message.Artist));
if (message.Updated)
{
BroadcastResourceChange(ModelAction.Updated, GetArtistResource(message.Artist));
}
}
}
}

View File

@ -290,10 +290,7 @@ namespace NzbDrone.Core.MediaCover
updated |= EnsureAlbumCovers(album);
}
if (updated)
{
_eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Artist));
}
_eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Artist, updated));
}
public void HandleAsync(ArtistDeletedEvent message)
@ -310,10 +307,8 @@ namespace NzbDrone.Core.MediaCover
if (message.DoRefresh)
{
var updated = EnsureAlbumCovers(message.Album);
if (updated)
{
_eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Album));
}
_eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Album, updated));
}
}

View File

@ -7,15 +7,18 @@ namespace NzbDrone.Core.MediaCover
{
public Artist Artist { get; set; }
public Album Album { get; set; }
public bool Updated { get; set; }
public MediaCoversUpdatedEvent(Artist artist)
public MediaCoversUpdatedEvent(Artist artist, bool updated)
{
Artist = artist;
Updated = updated;
}
public MediaCoversUpdatedEvent(Album album)
public MediaCoversUpdatedEvent(Album album, bool updated)
{
Album = album;
Updated = updated;
}
}
}