mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
fixed disk scan scheduler.
This commit is contained in:
@@ -2,15 +2,13 @@
|
||||
using System.IO;
|
||||
using Nancy;
|
||||
using Nancy.Responses;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Common.Serializer;
|
||||
|
||||
namespace NzbDrone.Api.Extensions
|
||||
{
|
||||
public static class JsonExtensions
|
||||
{
|
||||
private static readonly JsonSerializer Serializer = new JsonSerializer();
|
||||
private static readonly NancyJsonSerializer NancySerializer = new NancyJsonSerializer(Serializer);
|
||||
private static readonly NancyJsonSerializer NancySerializer = new NancyJsonSerializer();
|
||||
|
||||
public static T FromJson<T>(this Stream body) where T : class, new()
|
||||
{
|
||||
@@ -22,7 +20,7 @@ namespace NzbDrone.Api.Extensions
|
||||
var reader = new StreamReader(body, true);
|
||||
body.Position = 0;
|
||||
var value = reader.ReadToEnd();
|
||||
return (T)Serializer.Deserialize(value, type);
|
||||
return (T)Json.Deserialize(value, type);
|
||||
}
|
||||
|
||||
public static JsonResponse<TModel> AsResponse<TModel>(this TModel model, HttpStatusCode statusCode = HttpStatusCode.OK)
|
||||
|
||||
Reference in New Issue
Block a user