mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-22 07:42:28 +00:00
Mapping ArtistMetadataId
is needed for last/next monitored albums
This commit is contained in:
parent
a52c6f6f41
commit
56679861a0
2 changed files with 5 additions and 2 deletions
|
@ -204,8 +204,10 @@ private void MapCoversToLocal(params ArtistResource[] artists)
|
|||
|
||||
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 @@ public static ArtistResource ToResource(this NzbDrone.Core.Music.Artist model)
|
|||
return new ArtistResource
|
||||
{
|
||||
Id = model.Id,
|
||||
ArtistMetadataId = model.ArtistMetadataId,
|
||||
|
||||
ArtistName = model.Name,
|
||||
|
||||
|
|
Loading…
Reference in a new issue