mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-06 15:32:59 +01:00
Fix isMovie filter logic (#15594)
This commit is contained in:
parent
0ee81e87be
commit
94f3725208
2 changed files with 9 additions and 10 deletions
|
|
@ -1653,19 +1653,18 @@ public sealed class BaseItemRepository
|
||||||
var tags = filter.Tags.ToList();
|
var tags = filter.Tags.ToList();
|
||||||
var excludeTags = filter.ExcludeTags.ToList();
|
var excludeTags = filter.ExcludeTags.ToList();
|
||||||
|
|
||||||
if (filter.IsMovie == true)
|
if (filter.IsMovie.HasValue)
|
||||||
{
|
{
|
||||||
if (filter.IncludeItemTypes.Length == 0
|
var shouldIncludeAllMovieTypes = filter.IsMovie.Value
|
||||||
|
&& (filter.IncludeItemTypes.Length == 0
|
||||||
|| filter.IncludeItemTypes.Contains(BaseItemKind.Movie)
|
|| filter.IncludeItemTypes.Contains(BaseItemKind.Movie)
|
||||||
|| filter.IncludeItemTypes.Contains(BaseItemKind.Trailer))
|
|| filter.IncludeItemTypes.Contains(BaseItemKind.Trailer));
|
||||||
|
|
||||||
|
if (!shouldIncludeAllMovieTypes)
|
||||||
{
|
{
|
||||||
baseQuery = baseQuery.Where(e => e.IsMovie);
|
baseQuery = baseQuery.Where(e => e.IsMovie == filter.IsMovie.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (filter.IsMovie.HasValue)
|
|
||||||
{
|
|
||||||
baseQuery = baseQuery.Where(e => e.IsMovie == filter.IsMovie);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filter.IsSeries.HasValue)
|
if (filter.IsSeries.HasValue)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1409,7 +1409,7 @@ namespace MediaBrowser.Controller.Entities
|
||||||
if (this is BoxSet && (query.OrderBy is null || query.OrderBy.Count == 0))
|
if (this is BoxSet && (query.OrderBy is null || query.OrderBy.Count == 0))
|
||||||
{
|
{
|
||||||
realChildren = realChildren
|
realChildren = realChildren
|
||||||
.OrderBy(e => e.ProductionYear ?? int.MaxValue)
|
.OrderBy(e => e.PremiereDate ?? DateTime.MaxValue)
|
||||||
.ToArray();
|
.ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue