Look ma, history!

This commit is contained in:
Mark McDowall 2013-05-10 15:33:04 -07:00
commit d320c2b6a9
12 changed files with 62 additions and 56 deletions

View file

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using NLog;
using NzbDrone.Common.Messaging;
using NzbDrone.Core.Datastore;
using NzbDrone.Core.Download;
using NzbDrone.Core.Tv;
@ -14,6 +15,7 @@ namespace NzbDrone.Core.History
void Purge();
void Trim();
QualityModel GetBestQualityInHistory(int episodeId);
PagingSpec<History> Paged(PagingSpec<History> pagingSpec);
}
public class HistoryService : IHistoryService, IHandle<EpisodeGrabbedEvent>
@ -33,6 +35,11 @@ namespace NzbDrone.Core.History
return _historyRepository.All().ToList();
}
public PagingSpec<History> Paged(PagingSpec<History> pagingSpec)
{
return _historyRepository.Paged(pagingSpec);
}
public void Purge()
{
_historyRepository.Purge();