mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 17:27:59 +00:00
Calendar will now only show monitored episodes
This commit is contained in:
parent
f4a3394745
commit
440a128f28
2 changed files with 8 additions and 2 deletions
|
@ -16,6 +16,7 @@ public void Setup()
|
|||
var series = Builder<Series>.CreateNew()
|
||||
.With(s => s.Id = 0)
|
||||
.With(s => s.Runtime = 30)
|
||||
.With(s => s.Monitored = true)
|
||||
.Build();
|
||||
|
||||
series.Id = Db.Insert(series).Id;
|
||||
|
@ -23,6 +24,7 @@ public void Setup()
|
|||
var episode = Builder<Episode>.CreateNew()
|
||||
.With(e => e.Id = 0)
|
||||
.With(e => e.SeriesId = series.Id)
|
||||
.With(e => e.Monitored = true)
|
||||
.Build();
|
||||
|
||||
Db.Insert(episode);
|
||||
|
|
|
@ -119,8 +119,12 @@ public List<Episode> EpisodesWithFiles()
|
|||
|
||||
public List<Episode> EpisodesBetweenDates(DateTime startDate, DateTime endDate)
|
||||
{
|
||||
return Query.Where<Episode>(e => e.AirDate >= startDate)
|
||||
.AndWhere(e => e.AirDate <= endDate).ToList();
|
||||
return Query.Join<Episode, Series>(JoinType.Inner, e => e.Series, (e, s) => e.SeriesId == s.Id)
|
||||
.Where<Episode>(e => e.AirDate >= startDate)
|
||||
.AndWhere(e => e.AirDate <= endDate)
|
||||
.AndWhere(e => e.Monitored)
|
||||
.AndWhere(e => e.Series.Monitored)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void SetMonitoredFlat(Episode episode, bool monitored)
|
||||
|
|
Loading…
Reference in a new issue