mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 14:03:29 -07:00
json serializer updates.
This commit is contained in:
parent
67995a5cf6
commit
f9bb4178ed
13 changed files with 46 additions and 37 deletions
|
@ -1,5 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Configuration;
|
||||
|
||||
|
@ -14,17 +13,19 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
|||
{
|
||||
private readonly IHttpProvider _httpProvider;
|
||||
private readonly IConfigService _configService;
|
||||
private readonly IJsonSerializer _jsonSerializer;
|
||||
|
||||
public SceneMappingProxy(IHttpProvider httpProvider, IConfigService configService)
|
||||
public SceneMappingProxy(IHttpProvider httpProvider, IConfigService configService, IJsonSerializer jsonSerializer)
|
||||
{
|
||||
_httpProvider = httpProvider;
|
||||
_configService = configService;
|
||||
_jsonSerializer = jsonSerializer;
|
||||
}
|
||||
|
||||
public List<SceneMapping> Fetch()
|
||||
{
|
||||
var mappingsJson = _httpProvider.DownloadString(_configService.ServiceRootUrl + "/SceneMapping/Active");
|
||||
return JsonConvert.DeserializeObject<List<SceneMapping>>(mappingsJson);
|
||||
return _jsonSerializer.Deserialize<List<SceneMapping>>(mappingsJson);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue