mirror of
https://github.com/Radarr/Radarr
synced 2026-04-18 02:51:43 +02:00
bug fix for 15 movie wanted tab (#348)
This commit is contained in:
parent
f72b042d5d
commit
85fd8f2c65
1 changed files with 10 additions and 6 deletions
|
|
@ -4,6 +4,7 @@
|
|||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Datastore.Extensions;
|
||||
using Marr.Data.QGen;
|
||||
|
||||
namespace NzbDrone.Core.Tv
|
||||
{
|
||||
|
|
@ -137,17 +138,20 @@ public List<Movie> MoviesBetweenDates(DateTime start, DateTime end, bool include
|
|||
public PagingSpec<Movie> MoviesWithoutFiles(PagingSpec<Movie> pagingSpec)
|
||||
{
|
||||
|
||||
var query = Query.Where(pagingSpec.FilterExpression)
|
||||
pagingSpec.TotalRecords = GetMoviesWithoutFilesQuery(pagingSpec).GetRowCount();
|
||||
pagingSpec.Records = GetMoviesWithoutFilesQuery(pagingSpec).ToList();
|
||||
|
||||
return pagingSpec;
|
||||
}
|
||||
|
||||
public SortBuilder<Movie> GetMoviesWithoutFilesQuery(PagingSpec<Movie> pagingSpec)
|
||||
{
|
||||
return Query.Where(pagingSpec.FilterExpression)
|
||||
.AndWhere(m => m.MovieFileId == 0)
|
||||
.AndWhere(m => m.Status == MovieStatusType.Released)
|
||||
.OrderBy(pagingSpec.OrderByClause(), pagingSpec.ToSortDirection())
|
||||
.Skip(pagingSpec.PagingOffset())
|
||||
.Take(pagingSpec.PageSize);
|
||||
|
||||
pagingSpec.Records = query.ToList();
|
||||
pagingSpec.TotalRecords = pagingSpec.Records.Count;
|
||||
|
||||
return pagingSpec;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue