1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2025-01-03 05:25:10 +00:00

fixup! Fixed: Refresh cache for tracked queue on artist/album add or removal

This commit is contained in:
Bogdan 2024-09-19 01:36:59 +03:00
parent 19aaa553dc
commit aade6d66d1

View file

@ -299,22 +299,6 @@ public void Handle(AlbumInfoRefreshedEvent message)
}
}
public void Handle(AlbumAddedEvent message)
{
var cachedItems = _cache.Values
.Where(t =>
t.RemoteAlbum?.Albums == null ||
t.RemoteAlbum.Albums.Any(a => a.ForeignAlbumId == message.Album.ForeignAlbumId))
.ToList();
if (cachedItems.Any())
{
cachedItems.ForEach(UpdateCachedItem);
_eventAggregator.PublishEvent(new TrackedDownloadRefreshedEvent(GetTrackedDownloads()));
}
}
public void Handle(AlbumDeletedEvent message)
{
var cachedItems = _cache.Values