mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-15 17:52:57 -07:00
Added paging to the TV Requests page
This commit is contained in:
parent
69e324c670
commit
0b2e488e8f
10 changed files with 73 additions and 17 deletions
|
@ -130,7 +130,7 @@ namespace Ombi.Core.Engine
|
|||
var newRequest = tvBuilder.CreateNewRequest(tv);
|
||||
return await AddRequest(newRequest.NewRequest);
|
||||
}
|
||||
|
||||
|
||||
public async Task<IEnumerable<TvRequests>> GetRequests(int count, int position)
|
||||
{
|
||||
var shouldHide = await HideFromOtherUsers();
|
||||
|
@ -280,7 +280,7 @@ namespace Ombi.Core.Engine
|
|||
results.Background = PosterPathHelper.FixBackgroundPath(request.Background);
|
||||
results.QualityOverride = request.QualityOverride;
|
||||
results.RootFolder = request.RootFolder;
|
||||
|
||||
|
||||
await TvRepository.Update(results);
|
||||
return results;
|
||||
}
|
||||
|
@ -432,6 +432,19 @@ namespace Ombi.Core.Engine
|
|||
};
|
||||
}
|
||||
|
||||
public async Task<int> GetTotal()
|
||||
{
|
||||
var shouldHide = await HideFromOtherUsers();
|
||||
if (shouldHide.Hide)
|
||||
{
|
||||
return await TvRepository.Get(shouldHide.UserId).CountAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
return await TvRepository.Get().CountAsync();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<RequestEngineResult> AddExistingRequest(ChildRequests newRequest, TvRequests existingRequest)
|
||||
{
|
||||
// Add the child
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue