Mapping `ArtistMetadataId` is needed for last/next monitored albums

pull/4906/head
Bogdan 4 months ago
parent a52c6f6f41
commit 56679861a0

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

@ -77,6 +77,7 @@ namespace Lidarr.Api.V1.Artist
return new ArtistResource
{
Id = model.Id,
ArtistMetadataId = model.ArtistMetadataId,
ArtistName = model.Name,

Loading…
Cancel
Save