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

Mapping ArtistMetadataId is needed for last/next monitored albums

This commit is contained in:
Bogdan 2024-07-14 21:48:23 +03:00
parent a52c6f6f41
commit 56679861a0
2 changed files with 5 additions and 2 deletions

View file

@ -204,8 +204,10 @@ private void MapCoversToLocal(params ArtistResource[] artists)
private void LinkNextPreviousAlbums(params ArtistResource[] artists) private void LinkNextPreviousAlbums(params ArtistResource[] artists)
{ {
var nextAlbums = _albumService.GetNextAlbumsByArtistMetadataId(artists.Select(x => x.ArtistMetadataId)); var artistMetadataIds = artists.Select(x => x.ArtistMetadataId).Distinct().ToList();
var lastAlbums = _albumService.GetLastAlbumsByArtistMetadataId(artists.Select(x => x.ArtistMetadataId));
var nextAlbums = _albumService.GetNextAlbumsByArtistMetadataId(artistMetadataIds);
var lastAlbums = _albumService.GetLastAlbumsByArtistMetadataId(artistMetadataIds);
foreach (var artistResource in artists) foreach (var artistResource in artists)
{ {

View file

@ -77,6 +77,7 @@ public static ArtistResource ToResource(this NzbDrone.Core.Music.Artist model)
return new ArtistResource return new ArtistResource
{ {
Id = model.Id, Id = model.Id,
ArtistMetadataId = model.ArtistMetadataId,
ArtistName = model.Name, ArtistName = model.Name,