mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Added housekeeping to cleanup orphaned episodes and history items
This commit is contained in:
parent
174689f533
commit
07b68b17ee
14 changed files with 286 additions and 2 deletions
|
@ -18,6 +18,7 @@ namespace NzbDrone.Core.History
|
|||
void Trim();
|
||||
QualityModel GetBestQualityInHistory(int episodeId);
|
||||
PagingSpec<History> Paged(PagingSpec<History> pagingSpec);
|
||||
void CleanupOrphaned();
|
||||
}
|
||||
|
||||
public class HistoryService : IHistoryService, IHandle<EpisodeGrabbedEvent>, IHandle<EpisodeImportedEvent>
|
||||
|
@ -41,6 +42,12 @@ namespace NzbDrone.Core.History
|
|||
return _historyRepository.GetPaged(pagingSpec);
|
||||
}
|
||||
|
||||
public void CleanupOrphaned()
|
||||
{
|
||||
_historyRepository.CleanupOrphanedBySeries();
|
||||
_historyRepository.CleanupOrphanedByEpisode();
|
||||
}
|
||||
|
||||
public void Purge()
|
||||
{
|
||||
_historyRepository.Purge();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue