Fixed the issue where movie requests were no longer being requested.

Changed the API for movie requests so we only need to pass the ID to approve/Deny

TV Requests next #1601
This commit is contained in:
tidusjar 2017-10-19 21:42:59 +01:00
parent b7b0381ce7
commit 7c5bca3b2b
17 changed files with 226 additions and 156 deletions

View file

@ -38,7 +38,7 @@ namespace Ombi.Core.Engine
var now = DateTime.Now.Ticks;
if (_dbMovies == null || now - _cacheTime > 10000)
{
var allResults = await MovieRepository.Get().ToListAsync();
var allResults = await MovieRepository.GetAll().ToListAsync();
var distinctResults = allResults.DistinctBy(x => x.TheMovieDbId);
_dbMovies = distinctResults.ToDictionary(x => x.TheMovieDbId);
@ -63,7 +63,7 @@ namespace Ombi.Core.Engine
public RequestCountModel RequestCount()
{
var movieQuery = MovieRepository.Get();
var movieQuery = MovieRepository.GetAll();
var tvQuery = TvRepository.Get();
var pendingMovies = movieQuery.Count(x => !x.Approved && !x.Available);