Improvements to the UI and also finished the availability checker #865 #1464

This commit is contained in:
Jamie.Rees 2017-08-25 14:06:47 +01:00
parent 385d206287
commit 3cc45b3022
30 changed files with 317 additions and 126 deletions

View file

@ -15,17 +15,28 @@ namespace Ombi.Store.Repository.Requests
private IOmbiContext Db { get; }
public async Task<TvRequests> GetRequest(int tvDbId)
public async Task<TvRequests> GetRequestAsync(int tvDbId)
{
return await Db.TvRequests.Where(x => x.TvDbId == tvDbId)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.ThenInclude(x => x.RequestedUser)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.FirstOrDefaultAsync();
}
public TvRequests GetRequest(int tvDbId)
{
return Db.TvRequests.Where(x => x.TvDbId == tvDbId)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.RequestedUser)
.Include(x => x.ChildRequests)
.ThenInclude(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.FirstOrDefault();
}
public IQueryable<TvRequests> Get()
{
return Db.TvRequests
@ -40,6 +51,7 @@ namespace Ombi.Store.Repository.Requests
{
return Db.ChildRequests
.Include(x => x.RequestedUser)
.Include(x => x.ParentRequest)
.Include(x => x.SeasonRequests)
.ThenInclude(x => x.Episodes)
.AsQueryable();