Fixed: Artist/Album lookup endpoints display error on failure

This commit is contained in:
ta264 2019-04-07 21:46:05 +01:00
commit 6a414cff14
2 changed files with 2 additions and 6 deletions

View file

@ -19,14 +19,12 @@ namespace Lidarr.Api.V1.Artist
Get["/"] = x => Search();
}
private Response Search()
{
var searchResults = _searchProxy.SearchForNewArtist((string)Request.Query.term);
return MapToResource(searchResults).AsResponse();
return MapToResource(searchResults).ToList().AsResponse();
}
private static IEnumerable<ArtistResource> MapToResource(IEnumerable<NzbDrone.Core.Music.Artist> artist)
{
foreach (var currentArtist in artist)