mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Broadcast album updated if track file deleted
Ensures that album stats update in the Artist details page if track files are deleted.
This commit is contained in:
parent
12d8075184
commit
220df4da75
1 changed files with 10 additions and 1 deletions
|
@ -13,6 +13,7 @@ using NzbDrone.Core.Download;
|
|||
using NzbDrone.Core.Music.Events;
|
||||
using NzbDrone.Core.MediaFiles.Events;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
|
||||
namespace Lidarr.Api.V1.Albums
|
||||
{
|
||||
|
@ -20,7 +21,8 @@ namespace Lidarr.Api.V1.Albums
|
|||
IHandle<AlbumGrabbedEvent>,
|
||||
IHandle<AlbumEditedEvent>,
|
||||
IHandle<AlbumImportedEvent>,
|
||||
IHandle<TrackImportedEvent>
|
||||
IHandle<TrackImportedEvent>,
|
||||
IHandle<TrackFileDeletedEvent>
|
||||
|
||||
{
|
||||
protected readonly IReleaseService _releaseService;
|
||||
|
@ -129,5 +131,12 @@ namespace Lidarr.Api.V1.Albums
|
|||
{
|
||||
BroadcastResourceChange(ModelAction.Updated, message.TrackInfo.Album.ToResource());
|
||||
}
|
||||
|
||||
public void Handle(TrackFileDeletedEvent message)
|
||||
{
|
||||
if (message.Reason == DeleteMediaFileReason.Upgrade) return;
|
||||
|
||||
BroadcastResourceChange(ModelAction.Updated, MapToResource(message.TrackFile.Album.Value, true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue