mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-18 21:34:28 -04:00
Episode Activity added
New: Activity tab added to Episode Details
This commit is contained in:
@@ -12,6 +12,7 @@ namespace NzbDrone.Core.History
|
||||
{
|
||||
void Trim();
|
||||
List<QualityModel> GetEpisodeHistory(int episodeId);
|
||||
List<History> ByEpisode(int episodeId);
|
||||
}
|
||||
|
||||
public class HistoryRepository : BasicRepository<History>, IHistoryRepository
|
||||
@@ -37,6 +38,11 @@ namespace NzbDrone.Core.History
|
||||
return history.Select(h => h.Quality).ToList();
|
||||
}
|
||||
|
||||
public List<History> ByEpisode(int episodeId)
|
||||
{
|
||||
return Query.Where(h => h.EpisodeId == episodeId).ToList();
|
||||
}
|
||||
|
||||
public override PagingSpec<History> GetPaged(PagingSpec<History> pagingSpec)
|
||||
{
|
||||
var pagingQuery = Query.Join<History, Series>(JoinType.Inner, h => h.Series, (h, s) => h.SeriesId == s.Id)
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace NzbDrone.Core.History
|
||||
void Trim();
|
||||
QualityModel GetBestQualityInHistory(int episodeId);
|
||||
PagingSpec<History> Paged(PagingSpec<History> pagingSpec);
|
||||
List<History> ByEpisode(int episodeId);
|
||||
}
|
||||
|
||||
public class HistoryService : IHistoryService, IHandle<EpisodeGrabbedEvent>, IHandle<EpisodeImportedEvent>
|
||||
@@ -40,6 +41,11 @@ namespace NzbDrone.Core.History
|
||||
return _historyRepository.GetPaged(pagingSpec);
|
||||
}
|
||||
|
||||
public List<History> ByEpisode(int episodeId)
|
||||
{
|
||||
return _historyRepository.ByEpisode(episodeId);
|
||||
}
|
||||
|
||||
public void Purge()
|
||||
{
|
||||
_historyRepository.Purge();
|
||||
|
||||
Reference in New Issue
Block a user