mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-21 01:49:57 +02:00
de556764bd
New: Added changelog to UI
33 lines
978 B
C#
33 lines
978 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
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()
|
|
{
|
|
var branch = _configFileProvider.Branch;
|
|
return _updatePackageProvider.GetRecentUpdates(branch);
|
|
}
|
|
}
|
|
}
|