Small changes that might fix #1985 but doubt it

pull/2052/head
Jamie 6 years ago
parent 7c61a3cc0e
commit dd5e40f3cd

@ -0,0 +1,9 @@
using System;
namespace Ombi.Api.Radarr
{
public class CommandResult
{
public string name { get; set; }
}
}

@ -17,10 +17,7 @@ namespace Ombi.Api.Radarr.Models
public bool monitored { get; set; }
public int tmdbId { get; set; }
public List<string> images { get; set; }
public string cleanTitle { get; set; }
public string imdbId { get; set; }
public string titleSlug { get; set; }
public int id { get; set; }
public int year { get; set; }
public string minimumAvailability { get; set; }
}

@ -3,19 +3,10 @@
public class RadarrError
{
public string message { get; set; }
public string description { get; set; }
}
public class RadarrErrorResponse
{
public string propertyName { get; set; }
public string errorMessage { get; set; }
public object attemptedValue { get; set; }
public FormattedMessagePlaceholderValues formattedMessagePlaceholderValues { get; set; }
}
public class FormattedMessagePlaceholderValues
{
public string propertyName { get; set; }
public object propertyValue { get; set; }
}
}

@ -1,17 +0,0 @@
using System;
namespace Ombi.Api.Radarr
{
public partial class RadarrApi
{
public class CommandResult
{
public string name { get; set; }
public DateTime startedOn { get; set; }
public DateTime stateChangeTime { get; set; }
public bool sendUpdatesToClient { get; set; }
public string state { get; set; }
public int id { get; set; }
}
}
}

@ -82,7 +82,7 @@ namespace Ombi.Api.Radarr
titleSlug = title,
monitored = true,
year = year,
minimumAvailability = minimumAvailability,
minimumAvailability = minimumAvailability
};
if (searchNow)
@ -97,9 +97,9 @@ namespace Ombi.Api.Radarr
request.AddHeader("X-Api-Key", apiKey);
request.AddJsonBody(options);
var response = await Api.RequestContent(request);
try
{
var response = await Api.RequestContent(request);
if (response.Contains("\"message\":"))
{
var error = JsonConvert.DeserializeObject<RadarrError>(response);
@ -114,7 +114,7 @@ namespace Ombi.Api.Radarr
}
catch (JsonSerializationException jse)
{
Logger.LogError(LoggingEvents.RadarrApi, jse, "Error When adding movie to Radarr");
Logger.LogError(LoggingEvents.RadarrApi, jse, "Error When adding movie to Radarr, Reponse: {0}", response);
}
return null;
}

@ -8,11 +8,6 @@ namespace Ombi.Api.Sonarr.Models
public class CommandResult
{
public string name { get; set; }
public DateTime startedOn { get; set; }
public DateTime stateChangeTime { get; set; }
public bool sendUpdatesToClient { get; set; }
public string state { get; set; }
public int id { get; set; }
}
}

Loading…
Cancel
Save