1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-22 22:15:17 -04:00

Include version in services Changes api call so the server knows how to redirect.

This commit is contained in:
Taloth Saldono
2015-02-07 15:56:36 +01:00
parent 955029ec43
commit 40987cc335
3 changed files with 6 additions and 4 deletions
@@ -9,7 +9,7 @@ namespace NzbDrone.Core.Update
public interface IUpdatePackageProvider
{
UpdatePackage GetLatestUpdate(string branch, Version currentVersion);
List<UpdatePackage> GetRecentUpdates(string branch);
List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion);
}
public class UpdatePackageProvider : IUpdatePackageProvider
@@ -37,9 +37,10 @@ namespace NzbDrone.Core.Update
return update.UpdatePackage;
}
public List<UpdatePackage> GetRecentUpdates(string branch)
public List<UpdatePackage> 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);