mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
fixed some broken tests.
This commit is contained in:
parent
c1960525d7
commit
ba4950ea8f
32 changed files with 153 additions and 162 deletions
|
@ -21,14 +21,14 @@ namespace NzbDrone.Core.History
|
|||
|
||||
public void Trim()
|
||||
{
|
||||
var oldIds = Queryable().Where(c => c.Date < DateTime.Now.AddDays(-30).Date).Select(c => c.Id);
|
||||
DeleteMany(oldIds);
|
||||
var cutoff = DateTime.Now.AddDays(-30).Date;
|
||||
Delete(c=> c.Date < cutoff);
|
||||
}
|
||||
|
||||
|
||||
public QualityModel GetBestQualityInHistory(int episodeId)
|
||||
{
|
||||
var history = Queryable().Where(c => c.EpisodeId == episodeId)
|
||||
var history = Query.Where(c => c.EpisodeId == episodeId)
|
||||
.OrderByDescending(c => c.Quality).FirstOrDefault();
|
||||
|
||||
if (history != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue