mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 21:43:33 -07:00
Updated tests for UpcomingProvider. #ND-45 fixed
This commit is contained in:
parent
ac2f3399f0
commit
3fdfa69b94
2 changed files with 8 additions and 98 deletions
|
@ -18,27 +18,7 @@ namespace NzbDrone.Core.Providers
|
|||
_database = database;
|
||||
}
|
||||
|
||||
public virtual List<Episode> Yesterday()
|
||||
{
|
||||
return RecentEpisodes().Where(c => c.AirDate.Value.Date == DateTime.Now.Date.AddDays(-1)).ToList();
|
||||
}
|
||||
|
||||
public virtual List<Episode> Today()
|
||||
{
|
||||
return RecentEpisodes().Where(c => c.AirDate.Value.Date == DateTime.Now.Date).ToList();
|
||||
}
|
||||
|
||||
public virtual List<Episode> Tomorrow()
|
||||
{
|
||||
return RecentEpisodes().Where(c => c.AirDate.Value.Date == DateTime.Now.Date.AddDays(1)).ToList();
|
||||
}
|
||||
|
||||
public virtual List<Episode> Week()
|
||||
{
|
||||
return RecentEpisodes().Where(c => c.AirDate >= DateTime.Today.AddDays(2).Date).ToList();
|
||||
}
|
||||
|
||||
public virtual List<Episode> RecentEpisodes()
|
||||
public virtual List<Episode> UpcomingEpisodes()
|
||||
{
|
||||
return _database.Fetch<Episode, Series>(@"SELECT * FROM Episodes
|
||||
INNER JOIN Series ON Episodes.SeriesId = Series.SeriesId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue