Made the feedback from Sonarr better when Sonarr already has the series #85

This commit is contained in:
tidusjar 2016-03-29 10:34:20 +01:00
parent 5843dee2a5
commit fe0f6873e5
8 changed files with 66 additions and 19 deletions

View file

@ -131,7 +131,7 @@ namespace PlexRequests.UI.Modules
return Response.AsJson(new JsonResponseModel
{
Result = false,
Message = "Could not add the series to Sonarr"
Message = result.ErrorMessage ?? "Could not add the series to Sonarr"
});
}
@ -276,7 +276,7 @@ namespace PlexRequests.UI.Modules
if (sonarr.Enabled)
{
var result = sender.SendToSonarr(sonarr, r);
if (result != null)
if (!string.IsNullOrEmpty(result?.title))
{
r.Approved = true;
updatedRequests.Add(r);
@ -284,6 +284,7 @@ namespace PlexRequests.UI.Modules
else
{
Log.Error("Could not approve and send the TV {0} to Sonarr!", r.Title);
Log.Error("Error message: {0}", result?.ErrorMessage);
}
}
}