mirror of https://github.com/lidarr/Lidarr
Fixed: Metadata files not being created after rescan
(cherry picked from commit e2ff089232765b876719b324e0543441e0bd1521)
This commit is contained in:
parent
2982478dba
commit
a085dd38a6
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue