mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-10-03 01:01:34 +02:00
removed IEpisodeProvider, ILogProvider
fixed some broken tests.
This commit is contained in:
@@ -20,33 +20,37 @@ namespace NzbDrone.Core.Providers
|
||||
_sonicRepo = sonicRepo;
|
||||
}
|
||||
|
||||
public HistoryProvider()
|
||||
{
|
||||
}
|
||||
|
||||
#region HistoryProvider Members
|
||||
|
||||
public virtual List<History> AllItems()
|
||||
{
|
||||
return _sonicRepo.All<History>().ToList();
|
||||
}
|
||||
|
||||
|
||||
public virtual void Purge()
|
||||
{
|
||||
var all = _sonicRepo.All<History>();
|
||||
_sonicRepo.DeleteMany(all);
|
||||
Logger.Info("History has been Purged");
|
||||
}
|
||||
|
||||
|
||||
public virtual void Trim()
|
||||
{
|
||||
var old = _sonicRepo.All<History>().Where(h => h.Date < DateTime.Now.AddDays(-30));
|
||||
_sonicRepo.DeleteMany(old);
|
||||
Logger.Info("History has been trimmed, items older than 30 days have been removed");
|
||||
}
|
||||
|
||||
|
||||
public virtual void Insert(History item)
|
||||
{
|
||||
_sonicRepo.Add(item);
|
||||
//Logger.Info("Item added to history: {0} - {1}x{2:00}", item.Episode.Series.Title, item.Episode.SeasonNumber, item.Episode.EpisodeNumber);
|
||||
}
|
||||
|
||||
|
||||
public virtual bool Exists(int episodeId, QualityTypes quality, bool proper)
|
||||
{
|
||||
//Looks for the existance of this episode in History
|
||||
|
Reference in New Issue
Block a user