Added paging to the TV Requests page

This commit is contained in:
Jamie Rees 2018-04-24 14:44:22 +01:00
parent 69e324c670
commit 0b2e488e8f
10 changed files with 73 additions and 17 deletions

View file

@ -144,6 +144,19 @@ namespace Ombi.Core.Engine
return allRequests;
}
public async Task<int> GetTotal()
{
var shouldHide = await HideFromOtherUsers();
if (shouldHide.Hide)
{
return await MovieRepository.GetWithUser(shouldHide.UserId).CountAsync();
}
else
{
return await MovieRepository.GetWithUser().CountAsync();
}
}
/// <summary>
/// Gets the requests.
/// </summary>