Fixed: Disable checking for updates when in debug runtime

Same as a8e2b1520a

Closes #1626
pull/1620/head
Bogdan 2 years ago
parent af7fb442d2
commit 681f06e321

@ -34,15 +34,20 @@ namespace NzbDrone.Core.Update
public UpdatePackage GetLatestUpdate(string branch, Version currentVersion)
{
if (BuildInfo.IsDebug)
{
return null;
}
var request = _requestBuilder.Create()
.Resource("/update/{branch}")
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
.AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
.Resource("/update/{branch}")
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
.AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
if (_analyticsService.IsEnabled)
{
@ -62,15 +67,20 @@ namespace NzbDrone.Core.Update
public List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion, Version previousVersion)
{
if (BuildInfo.IsDebug)
{
return new List<UpdatePackage>();
}
var request = _requestBuilder.Create()
.Resource("/update/{branch}/changes")
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
.AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
.Resource("/update/{branch}/changes")
.AddQueryParam("version", currentVersion)
.AddQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant())
.AddQueryParam("arch", RuntimeInformation.OSArchitecture)
.AddQueryParam("runtime", "netcore")
.AddQueryParam("runtimeVer", _platformInfo.Version)
.AddQueryParam("dbType", _mainDatabase.DatabaseType)
.SetSegment("branch", branch);
if (previousVersion != null && previousVersion != currentVersion)
{

Loading…
Cancel
Save