2013-11-20 00:42:17 +00:00
|
|
|
|
using System.Collections.Generic;
|
2015-02-07 14:56:36 +00:00
|
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
2013-09-28 18:48:30 +00:00
|
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Update
|
|
|
|
|
{
|
|
|
|
|
public interface IRecentUpdateProvider
|
|
|
|
|
{
|
|
|
|
|
List<UpdatePackage> GetRecentUpdatePackages();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class RecentUpdateProvider : IRecentUpdateProvider
|
|
|
|
|
{
|
|
|
|
|
private readonly IConfigFileProvider _configFileProvider;
|
|
|
|
|
private readonly IUpdatePackageProvider _updatePackageProvider;
|
|
|
|
|
|
|
|
|
|
public RecentUpdateProvider(IConfigFileProvider configFileProvider,
|
|
|
|
|
IUpdatePackageProvider updatePackageProvider)
|
|
|
|
|
{
|
|
|
|
|
_configFileProvider = configFileProvider;
|
|
|
|
|
_updatePackageProvider = updatePackageProvider;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public List<UpdatePackage> GetRecentUpdatePackages()
|
|
|
|
|
{
|
2017-01-08 19:09:44 +00:00
|
|
|
|
var branch = _configFileProvider.Branch;
|
2015-02-07 14:56:36 +00:00
|
|
|
|
return _updatePackageProvider.GetRecentUpdates(branch, BuildInfo.Version);
|
2013-09-28 18:48:30 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|