You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readarr/NzbDrone.Core/DataAugmentation/Scene/SceneMappingProxy.cs

28 lines
746 B

using System.Collections.Generic;
using NzbDrone.Common;
using NzbDrone.Common.Serializer;
using NzbDrone.Core.Configuration;
namespace NzbDrone.Core.DataAugmentation.Scene
{
public interface ISceneMappingProxy
{
List<SceneMapping> Fetch();
}
public class SceneMappingProxy : ISceneMappingProxy
{
private readonly IHttpProvider _httpProvider;
public SceneMappingProxy(IHttpProvider httpProvider)
{
_httpProvider = httpProvider;
}
public List<SceneMapping> Fetch()
{
var mappingsJson = _httpProvider.DownloadString(Services.RootUrl + "/v1/SceneMapping");
return Json.Deserialize<List<SceneMapping>>(mappingsJson);
}
}
}