mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Fixed #144
This commit is contained in:
parent
08cbf927ee
commit
3efd54c1b6
7 changed files with 57 additions and 15 deletions
|
@ -25,6 +25,7 @@
|
|||
// ************************************************************************/
|
||||
#endregion
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
|
@ -33,13 +34,19 @@ using Newtonsoft.Json;
|
|||
using NLog;
|
||||
|
||||
using PlexRequests.Api.Interfaces;
|
||||
|
||||
using PlexRequests.Helpers;
|
||||
using RestSharp;
|
||||
|
||||
namespace PlexRequests.Api
|
||||
{
|
||||
public class ApiRequest : IApiRequest
|
||||
{
|
||||
private JsonSerializerSettings Settings = new JsonSerializerSettings
|
||||
{
|
||||
NullValueHandling = NullValueHandling.Ignore,
|
||||
MissingMemberHandling = MissingMemberHandling.Ignore
|
||||
};
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
/// <summary>
|
||||
/// An API request handler
|
||||
|
@ -108,7 +115,7 @@ namespace PlexRequests.Api
|
|||
}
|
||||
|
||||
|
||||
var json = JsonConvert.DeserializeObject<T>(response.Content);
|
||||
var json = JsonConvert.DeserializeObject<T>(response.Content, Settings);
|
||||
|
||||
return json;
|
||||
}
|
||||
|
@ -129,4 +136,6 @@ namespace PlexRequests.Api
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace PlexRequests.Api
|
|||
while (seasonIncrement < seasonCount)
|
||||
{
|
||||
seasonList = VerifyShowHasLoaded(tvdbId, apiKey, baseUrl);
|
||||
seasonIncrement = seasonList.data?.Length ?? 0;
|
||||
seasonIncrement = seasonList.Data?.Length ?? 0;
|
||||
|
||||
if (sw.ElapsedMilliseconds > 30000) // Break out after 30 seconds, it's not going to get added
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue