Fixed: Album lookup API endpoint updated for new DB schema (#693)

This commit is contained in:
ta264
2019-03-23 19:01:34 +00:00
committed by GitHub
parent 6e4b1ba1fe
commit dbb08c15d2
2 changed files with 10 additions and 7 deletions
@@ -280,10 +280,13 @@ namespace NzbDrone.Core.MetadataSource.SkyHook
{
var album = _albumService.FindById(resource.Id) ?? MapAlbum(resource, null);
if (album.Artist == null)
var artist = _artistService.FindById(resource.ArtistId);
if (artist == null)
{
album.Artist = _artistService.GetArtist(album.ArtistId);
artist = new Artist();
artist.Metadata = MapArtistMetadata(resource.Artists.Single(x => x.Id == resource.ArtistId));
}
album.Artist = artist;
return album;
}