fix #2527 - Music request not triggering search and failing

pull/2530/head
Anojh 6 years ago
parent 26ce54b91d
commit 86bff311f1

@ -156,8 +156,8 @@ namespace Ombi.Api.Lidarr
public Task<CommandResult> AlbumSearch(int[] albumIds, string apiKey, string baseUrl)
{
var request = new Request($"{ApiVersion}/command/AlbumSearch", baseUrl, HttpMethod.Post);
request.AddJsonBody(albumIds);
var request = new Request($"{ApiVersion}/command/", baseUrl, HttpMethod.Post);
request.AddJsonBody(new { name = "AlbumSearch", albumIds });
AddHeaders(request, apiKey);
return Api.Request<CommandResult>(request);
}

@ -82,7 +82,8 @@ namespace Ombi.Core.Senders
}
else
{
await SetupAlbum(model, artist, settings);
SenderResult result = await SetupAlbum(model, artist, settings);
return result;
}
return new SenderResult { Success = false, Sent = false, Message = "Album is already monitored" };
@ -122,7 +123,7 @@ namespace Ombi.Core.Senders
}
if (result.monitored)
{
return new SenderResult {Message = "Album has been requested!", Sent = true, Success = true};
return new SenderResult { Message = "Album has been requested!", Sent = true, Success = true};
}
return new SenderResult { Message = "Could not set album to monitored", Sent = false, Success = false };
}

Loading…
Cancel
Save