New: Show previously installed version in Updates UI

Closes #308
Closes #309
Closes #313
Closes #319
Closes #460
Closes #608

Co-Authored-By: Taloth <Taloth@users.noreply.github.com>
This commit is contained in:
Qstick
2021-01-24 23:33:54 -05:00
parent 874b4fc401
commit f5847e9e5b
18 changed files with 349 additions and 10 deletions
@@ -13,7 +13,7 @@ namespace NzbDrone.Core.Update
public interface IUpdatePackageProvider
{
UpdatePackage GetLatestUpdate(string branch, Version currentVersion);
List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion);
List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion, Version previousVersion = null);
}
public class UpdatePackageProvider : IUpdatePackageProvider
@@ -61,7 +61,7 @@ namespace NzbDrone.Core.Update
return update.UpdatePackage;
}
public List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion)
public List<UpdatePackage> GetRecentUpdates(string branch, Version currentVersion, Version previousVersion)
{
var request = _requestBuilder.Create()
.Resource("/update/{branch}/changes")
@@ -72,6 +72,11 @@ namespace NzbDrone.Core.Update
.AddQueryParam("runtimeVer", _platformInfo.Version)
.SetSegment("branch", branch);
if (previousVersion != null && previousVersion != currentVersion)
{
request.AddQueryParam("prevVersion", previousVersion);
}
if (_analyticsService.IsEnabled)
{
// Send if the system is active so we know which versions to deprecate/ignore