diff --git a/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs b/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs index d137750e3..ff2ae0699 100644 --- a/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs +++ b/src/NzbDrone.Core.Test/UpdateTests/UpdatePackageProviderFixture.cs @@ -37,7 +37,7 @@ namespace NzbDrone.Core.Test.UpdateTests { const string branch = "master"; UseRealHttp(); - var recent = Subject.GetRecentUpdates(branch); + var recent = Subject.GetRecentUpdates(branch, new Version(2, 0)); recent.Should().NotBeEmpty(); recent.Should().OnlyContain(c => c.Hash.IsNotNullOrWhiteSpace()); diff --git a/src/NzbDrone.Core/Update/RecentUpdateProvider.cs b/src/NzbDrone.Core/Update/RecentUpdateProvider.cs index 96a915694..6fcaf42c2 100644 --- a/src/NzbDrone.Core/Update/RecentUpdateProvider.cs +++ b/src/NzbDrone.Core/Update/RecentUpdateProvider.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Core.Configuration; namespace NzbDrone.Core.Update @@ -23,7 +24,7 @@ namespace NzbDrone.Core.Update public List GetRecentUpdatePackages() { var branch = _configFileProvider.Branch; - return _updatePackageProvider.GetRecentUpdates(branch); + return _updatePackageProvider.GetRecentUpdates(branch, BuildInfo.Version); } } } diff --git a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs index b31b4bb78..86a4f6299 100644 --- a/src/NzbDrone.Core/Update/UpdatePackageProvider.cs +++ b/src/NzbDrone.Core/Update/UpdatePackageProvider.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Update public interface IUpdatePackageProvider { UpdatePackage GetLatestUpdate(string branch, Version currentVersion); - List GetRecentUpdates(string branch); + List GetRecentUpdates(string branch, Version currentVersion); } public class UpdatePackageProvider : IUpdatePackageProvider @@ -37,9 +37,10 @@ namespace NzbDrone.Core.Update return update.UpdatePackage; } - public List GetRecentUpdates(string branch) + public List GetRecentUpdates(string branch, Version currentVersion) { var request = _requestBuilder.Build("/update/{branch}/changes"); + request.UriBuilder.SetQueryParam("version", currentVersion); request.UriBuilder.SetQueryParam("os", OsInfo.Os.ToString().ToLowerInvariant()); request.AddSegment("branch", branch);