Fixed: Improve Album Added by Metadata Messaging

This commit is contained in:
bakerboy448 2025-09-18 09:53:26 -05:00
parent fc560332ad
commit 2b5967d36a

View file

@ -41,6 +41,7 @@ public void SearchForRecentlyAdded(int artistId)
if (toSearch.Any()) if (toSearch.Any())
{ {
_logger.Trace("Found {0} albums flagged for search on add", toSearch.Count);
toSearch.ForEach(x => x.AddOptions.SearchForNewAlbum = false); toSearch.ForEach(x => x.AddOptions.SearchForNewAlbum = false);
_albumService.SetAddOptions(toSearch); _albumService.SetAddOptions(toSearch);
@ -49,11 +50,13 @@ public void SearchForRecentlyAdded(int artistId)
var recentlyAddedIds = _addedAlbumsCache.Find(artistId.ToString()); var recentlyAddedIds = _addedAlbumsCache.Find(artistId.ToString());
if (recentlyAddedIds != null) if (recentlyAddedIds != null)
{ {
_logger.Trace("Found and monitored {0} albums by artist [{1}] during metadata refresh.", recentlyAddedIds.Count, artistId);
toSearch.AddRange(allAlbums.Where(x => recentlyAddedIds.Contains(x.Id))); toSearch.AddRange(allAlbums.Where(x => recentlyAddedIds.Contains(x.Id)));
} }
if (toSearch.Any()) if (toSearch.Any())
{ {
_logger.Debug("Searching for {0} monitored albums for artist [{1}] added during metadata refresh.", toSearch.Count, artistId);
_commandQueueManager.Push(new AlbumSearchCommand(toSearch.Select(e => e.Id).ToList())); _commandQueueManager.Push(new AlbumSearchCommand(toSearch.Select(e => e.Id).ToList()));
} }