mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-14 09:12:57 -07:00
Request Grid test
This commit is contained in:
parent
e0018f63fa
commit
d5ec429893
24 changed files with 583 additions and 71 deletions
|
@ -14,6 +14,7 @@ using System.Globalization;
|
|||
using System.Linq;
|
||||
using System.Security.Principal;
|
||||
using System.Threading.Tasks;
|
||||
using Ombi.Core.Engine.Interfaces;
|
||||
|
||||
namespace Ombi.Core.Engine
|
||||
{
|
||||
|
@ -160,12 +161,18 @@ namespace Ombi.Core.Engine
|
|||
return null;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetMovieRequests(int count, int position)
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetRequests(int count, int position)
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync(count, position);
|
||||
return allRequests;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetRequests()
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync();
|
||||
return allRequests;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> SearchMovieRequest(string search)
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync();
|
||||
|
@ -256,5 +263,23 @@ namespace Ombi.Core.Engine
|
|||
|
||||
return new RequestEngineResult {RequestAdded = true};
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetApprovedRequests()
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync();
|
||||
return allRequests.Where(x => x.Approved && !x.Available);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetNewRequests()
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync();
|
||||
return allRequests.Where(x => !x.Approved && !x.Available);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MovieRequestModel>> GetAvailableRequests()
|
||||
{
|
||||
var allRequests = await MovieRequestService.GetAllAsync();
|
||||
return allRequests.Where(x => !x.Approved && x.Available);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue