mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Changelog is now available in the UI
New: Added changelog to UI
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Common;
|
||||
using RestSharp;
|
||||
using NzbDrone.Core.Rest;
|
||||
@@ -8,6 +9,7 @@ namespace NzbDrone.Core.Update
|
||||
public interface IUpdatePackageProvider
|
||||
{
|
||||
UpdatePackage GetLatestUpdate(string branch, Version currentVersion);
|
||||
List<UpdatePackage> GetRecentUpdates(string branch);
|
||||
}
|
||||
|
||||
public class UpdatePackageProvider : IUpdatePackageProvider
|
||||
@@ -27,5 +29,19 @@ namespace NzbDrone.Core.Update
|
||||
|
||||
return update.UpdatePackage;
|
||||
}
|
||||
|
||||
public List<UpdatePackage> GetRecentUpdates(string branch)
|
||||
{
|
||||
var restClient = new RestClient(Services.RootUrl);
|
||||
|
||||
var request = new RestRequest("/v1/update/{branch}/all");
|
||||
|
||||
request.AddUrlSegment("branch", branch);
|
||||
request.AddParameter("limit", 5);
|
||||
|
||||
var updates = restClient.ExecuteAndValidate<List<UpdatePackage>>(request);
|
||||
|
||||
return updates;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user