You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
876 B
29 lines
876 B
using NzbDrone.Common.EnvironmentInfo;
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
namespace NzbDrone.Core.Update
|
|
{
|
|
public interface ICheckUpdateService
|
|
{
|
|
UpdatePackage AvailableUpdate();
|
|
}
|
|
|
|
public class CheckUpdateService : ICheckUpdateService
|
|
{
|
|
private readonly IUpdatePackageProvider _updatePackageProvider;
|
|
private readonly IConfigFileProvider _configFileProvider;
|
|
|
|
public CheckUpdateService(IUpdatePackageProvider updatePackageProvider,
|
|
IConfigFileProvider configFileProvider)
|
|
{
|
|
_updatePackageProvider = updatePackageProvider;
|
|
_configFileProvider = configFileProvider;
|
|
}
|
|
|
|
public UpdatePackage AvailableUpdate()
|
|
{
|
|
return _updatePackageProvider.GetLatestUpdate(_configFileProvider.Branch, BuildInfo.Version);
|
|
}
|
|
}
|
|
}
|