|
|
@ -13,6 +13,7 @@ using NzbDrone.Core.Download;
|
|
|
|
using NzbDrone.Core.Music.Events;
|
|
|
|
using NzbDrone.Core.Music.Events;
|
|
|
|
using NzbDrone.Core.MediaFiles.Events;
|
|
|
|
using NzbDrone.Core.MediaFiles.Events;
|
|
|
|
using NzbDrone.Core.MediaCover;
|
|
|
|
using NzbDrone.Core.MediaCover;
|
|
|
|
|
|
|
|
using NzbDrone.Core.MediaFiles;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Lidarr.Api.V1.Albums
|
|
|
|
namespace Lidarr.Api.V1.Albums
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -20,7 +21,8 @@ namespace Lidarr.Api.V1.Albums
|
|
|
|
IHandle<AlbumGrabbedEvent>,
|
|
|
|
IHandle<AlbumGrabbedEvent>,
|
|
|
|
IHandle<AlbumEditedEvent>,
|
|
|
|
IHandle<AlbumEditedEvent>,
|
|
|
|
IHandle<AlbumImportedEvent>,
|
|
|
|
IHandle<AlbumImportedEvent>,
|
|
|
|
IHandle<TrackImportedEvent>
|
|
|
|
IHandle<TrackImportedEvent>,
|
|
|
|
|
|
|
|
IHandle<TrackFileDeletedEvent>
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
protected readonly IReleaseService _releaseService;
|
|
|
|
protected readonly IReleaseService _releaseService;
|
|
|
@ -129,5 +131,12 @@ namespace Lidarr.Api.V1.Albums
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BroadcastResourceChange(ModelAction.Updated, message.TrackInfo.Album.ToResource());
|
|
|
|
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));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|