mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
broke up EnvironmentProvider into different services
This commit is contained in:
parent
4d874829e8
commit
6b0a24e28e
54 changed files with 549 additions and 560 deletions
|
@ -6,36 +6,20 @@ using System.Text;
|
|||
using NLog;
|
||||
using Newtonsoft.Json;
|
||||
using NzbDrone.Common.Contract;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
namespace NzbDrone.Common
|
||||
{
|
||||
|
||||
public class RestProvider
|
||||
{
|
||||
|
||||
private static readonly Logger logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly IEnvironmentProvider _environmentProvider;
|
||||
|
||||
|
||||
public RestProvider(IEnvironmentProvider environmentProvider)
|
||||
{
|
||||
_environmentProvider = environmentProvider;
|
||||
}
|
||||
|
||||
public RestProvider()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private const int TIMEOUT = 15000;
|
||||
private const string METHOD = "POST";
|
||||
|
||||
public virtual void PostData(string url, ReportBase reportBase)
|
||||
{
|
||||
reportBase.UGuid = EnvironmentProvider.UGuid;
|
||||
reportBase.Version = _environmentProvider.Version.ToString();
|
||||
reportBase.IsProduction = EnvironmentProvider.IsProduction;
|
||||
reportBase.Version = BuildInfo.Version.ToString();
|
||||
reportBase.IsProduction = RuntimeInfo.IsProduction;
|
||||
|
||||
PostData(url, reportBase as object);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue