mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-21 05:53:33 -07:00
moved history over to objectdb
This commit is contained in:
parent
cf8be4bf8f
commit
f568fdad6a
20 changed files with 259 additions and 494 deletions
47
NzbDrone.Core/History/HistoryService.cs
Normal file
47
NzbDrone.Core/History/HistoryService.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
using NzbDrone.Core.Tv;
|
||||
|
||||
namespace NzbDrone.Core.History
|
||||
{
|
||||
|
||||
public class HistoryService
|
||||
{
|
||||
private readonly IHistoryRepository _historyRepository;
|
||||
private readonly Logger _logger;
|
||||
|
||||
|
||||
public HistoryService(IHistoryRepository historyRepository, Logger logger)
|
||||
{
|
||||
_historyRepository = historyRepository;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public List<History> All()
|
||||
{
|
||||
return _historyRepository.All().ToList();
|
||||
}
|
||||
|
||||
public void Purge()
|
||||
{
|
||||
_historyRepository.Purge();
|
||||
}
|
||||
|
||||
public virtual void Trim()
|
||||
{
|
||||
_historyRepository.Trim();
|
||||
}
|
||||
|
||||
public void Add(History item)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual QualityModel GetBestQualityInHistory(int seriesId, int seasonNumber, int episodeNumber)
|
||||
{
|
||||
return _historyRepository.GetBestQualityInHistory(seriesId, seasonNumber, episodeNumber);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue