From 86bff311f1e0cfb9e74d94566fc9a607336a1dd2 Mon Sep 17 00:00:00 2001 From: Anojh Date: Sat, 22 Sep 2018 10:34:16 -0700 Subject: [PATCH] fix #2527 - Music request not triggering search and failing --- src/Ombi.Api.Lidarr/LidarrApi.cs | 4 ++-- src/Ombi.Core/Senders/MusicSender.cs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Ombi.Api.Lidarr/LidarrApi.cs b/src/Ombi.Api.Lidarr/LidarrApi.cs index 8cda49cbf..a6a283703 100644 --- a/src/Ombi.Api.Lidarr/LidarrApi.cs +++ b/src/Ombi.Api.Lidarr/LidarrApi.cs @@ -156,8 +156,8 @@ namespace Ombi.Api.Lidarr public Task 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(request); } diff --git a/src/Ombi.Core/Senders/MusicSender.cs b/src/Ombi.Core/Senders/MusicSender.cs index 937204be5..481fe4090 100644 --- a/src/Ombi.Core/Senders/MusicSender.cs +++ b/src/Ombi.Core/Senders/MusicSender.cs @@ -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 }; }