mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-12 16:22:55 -07:00
Should fix #1538
This commit is contained in:
parent
95327a3146
commit
cc8730996c
2 changed files with 13 additions and 8 deletions
|
@ -8,11 +8,11 @@
|
|||
public int season { get; set; }
|
||||
public int number { get; set; }
|
||||
public string airdate { get; set; }
|
||||
public string airtime { get; set; }
|
||||
//public string airtime { get; set; }
|
||||
public string airstamp { get; set; }
|
||||
public int runtime { get; set; }
|
||||
//public int runtime { get; set; }
|
||||
public Image image { get; set; }
|
||||
public string summary { get; set; }
|
||||
public Links _links { get; set; }
|
||||
//public Links _links { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -14,9 +13,14 @@ namespace Ombi.Api
|
|||
public Api(ILogger<Api> log)
|
||||
{
|
||||
Logger = log;
|
||||
_handler = new HttpClientHandler
|
||||
{
|
||||
ServerCertificateCustomValidationCallback = (message, certificate2, arg3, arg4) => true
|
||||
};
|
||||
}
|
||||
|
||||
private ILogger<Api> Logger { get; }
|
||||
private readonly HttpMessageHandler _handler;
|
||||
|
||||
private static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
|
||||
{
|
||||
|
@ -25,8 +29,9 @@ namespace Ombi.Api
|
|||
|
||||
public async Task<T> Request<T>(Request request)
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
using (var httpClient = new HttpClient(_handler))
|
||||
{
|
||||
|
||||
using (var httpRequestMessage = new HttpRequestMessage(request.HttpMethod, request.FullUri))
|
||||
{
|
||||
// Add the Json Body
|
||||
|
@ -70,7 +75,7 @@ namespace Ombi.Api
|
|||
|
||||
public async Task<string> RequestContent(Request request)
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
using (var httpClient = new HttpClient(_handler))
|
||||
{
|
||||
using (var httpRequestMessage = new HttpRequestMessage(request.HttpMethod, request.FullUri))
|
||||
{
|
||||
|
@ -104,7 +109,7 @@ namespace Ombi.Api
|
|||
|
||||
public async Task Request(Request request)
|
||||
{
|
||||
using (var httpClient = new HttpClient())
|
||||
using (var httpClient = new HttpClient(_handler))
|
||||
{
|
||||
using (var httpRequestMessage = new HttpRequestMessage(request.HttpMethod, request.FullUri))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue