|
|
|
@ -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);
|
|
|
|
|
|
|
|
|
|