1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-26 22:46:53 -04:00

New: Postgres Support

Co-Authored-By: Qstick <376117+Qstick@users.noreply.github.com>
This commit is contained in:
Robin Dadswell
2022-03-28 21:45:52 +01:00
parent df863a08a1
commit 80b1aa9a2c
124 changed files with 1743 additions and 912 deletions
@@ -5,6 +5,7 @@ using NzbDrone.Common.Cloud;
using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Common.Http;
using NzbDrone.Core.Analytics;
using NzbDrone.Core.Datastore;
namespace NzbDrone.Core.Update
{
@@ -20,13 +21,15 @@ namespace NzbDrone.Core.Update
private readonly IHttpRequestBuilderFactory _requestBuilder;
private readonly IPlatformInfo _platformInfo;
private readonly IAnalyticsService _analyticsService;
private readonly IMainDatabase _mainDatabase;
public UpdatePackageProvider(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBuilder, IAnalyticsService analyticsService, IPlatformInfo platformInfo)
public UpdatePackageProvider(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBuilder, IAnalyticsService analyticsService, IPlatformInfo platformInfo, IMainDatabase mainDatabase)
{
_platformInfo = platformInfo;
_analyticsService = analyticsService;
_requestBuilder = requestBuilder.Services;
_httpClient = httpClient;
_mainDatabase = mainDatabase;
}
public UpdatePackage GetLatestUpdate(string branch, Version currentVersion)
@@ -38,6 +41,7 @@ namespace NzbDrone.Core.Update
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
.AddQueryParam("runtime", PlatformInfo.Platform.ToString().ToLowerInvariant())
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
if (_analyticsService.IsEnabled)