mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Fixed: Correctly delete trackfiles on AlbumDeletedEvent
GetFilesByAlbum performs a join on the album releases under the hood, which won't be populated once the album is deleted. Fix by providing a special delete method which omits the join and just looks at albumId.
This commit is contained in:
@@ -148,8 +148,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||
|
||||
public void HandleAsync(AlbumDeletedEvent message)
|
||||
{
|
||||
var files = GetFilesByAlbum(message.Album.Id);
|
||||
_mediaFileRepository.DeleteMany(files);
|
||||
_mediaFileRepository.DeleteFilesByAlbum(message.Album.Id);
|
||||
}
|
||||
|
||||
public List<TrackFile> GetFilesByArtist(int artistId)
|
||||
|
||||
Reference in New Issue
Block a user