mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-21 22:25:03 -04:00
Added: Platform Detection Improvements
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common.Cloud;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
@@ -15,11 +15,13 @@ namespace NzbDrone.Core.Update
|
||||
public class UpdatePackageProvider : IUpdatePackageProvider
|
||||
{
|
||||
private readonly IHttpClient _httpClient;
|
||||
private readonly IPlatformInfo _platformInfo;
|
||||
private readonly IHttpRequestBuilderFactory _requestBuilder;
|
||||
|
||||
public UpdatePackageProvider(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBuilder)
|
||||
public UpdatePackageProvider(IHttpClient httpClient, IRadarrCloudRequestBuilder requestBuilder, IPlatformInfo platformInfo)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_platformInfo = platformInfo;
|
||||
_requestBuilder = requestBuilder.Services;
|
||||
}
|
||||
|
||||
@@ -29,6 +31,7 @@ namespace NzbDrone.Core.Update
|
||||
.Resource("/update/{branch}")
|
||||
.AddQueryParam("version", currentVersion)
|
||||
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
|
||||
.AddQueryParam("runtimeVer", _platformInfo.Version)
|
||||
.SetSegment("branch", branch)
|
||||
.Build();
|
||||
|
||||
@@ -45,6 +48,7 @@ namespace NzbDrone.Core.Update
|
||||
.Resource("/update/{branch}/changes")
|
||||
.AddQueryParam("version", currentVersion)
|
||||
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
|
||||
.AddQueryParam("runtimeVer", _platformInfo.Version)
|
||||
.SetSegment("branch", branch)
|
||||
.Build();
|
||||
|
||||
@@ -53,4 +57,4 @@ namespace NzbDrone.Core.Update
|
||||
return updates.Resource;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user