add index number filter

pull/702/head
Luke Pulverenti 8 years ago
parent 2f39ad1673
commit 7dd2b1592c

@ -110,6 +110,7 @@ namespace MediaBrowser.Controller.Entities
internal List<Guid> ItemIdsFromPersonFilters { get; set; } internal List<Guid> ItemIdsFromPersonFilters { get; set; }
public int? ParentIndexNumber { get; set; } public int? ParentIndexNumber { get; set; }
public int? ParentIndexNumberNotEquals { get; set; }
public int? IndexNumber { get; set; } public int? IndexNumber { get; set; }
public int? MinParentalRating { get; set; } public int? MinParentalRating { get; set; }
public int? MaxParentalRating { get; set; } public int? MaxParentalRating { get; set; }
@ -141,7 +142,7 @@ namespace MediaBrowser.Controller.Entities
public bool GroupByPresentationUniqueKey { get; set; } public bool GroupByPresentationUniqueKey { get; set; }
public bool EnableTotalRecordCount { get; set; } public bool EnableTotalRecordCount { get; set; }
public bool ForceDirect { get; set; } public bool ForceDirect { get; set; }
public Dictionary<string,string> ExcludeProviderIds { get; set; } public Dictionary<string, string> ExcludeProviderIds { get; set; }
public InternalItemsQuery() public InternalItemsQuery()
{ {

@ -1698,10 +1698,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
{ {
var groups = new List<string>(); var groups = new List<string>();
if (!string.IsNullOrWhiteSpace(query.GroupByAncestorOfType)) //if (!string.IsNullOrWhiteSpace(query.GroupByAncestorOfType))
{ //{
groups.Add("(Select PresentationUniqueKey from TypedBaseItems B where B.Type = 'MediaBrowser.Controller.Entities.TV.Series' And B.Guid in (Select AncestorId from AncestorIds where ItemId=A.Guid))"); // groups.Add("(Select PresentationUniqueKey from TypedBaseItems B where B.Type = 'MediaBrowser.Controller.Entities.TV.Series' And B.Guid in (Select AncestorId from AncestorIds where ItemId=A.Guid))");
} //}
if (EnableGroupByPresentationUniqueKey(query)) if (EnableGroupByPresentationUniqueKey(query))
{ {

@ -132,7 +132,8 @@ namespace MediaBrowser.Server.Implementations.TV
SortOrder = SortOrder.Ascending, SortOrder = SortOrder.Ascending,
Limit = 1, Limit = 1,
IsPlayed = false, IsPlayed = false,
IsVirtualItem = false IsVirtualItem = false,
ParentIndexNumberNotEquals = 0
}).Cast<Episode>().FirstOrDefault(); }).Cast<Episode>().FirstOrDefault();
@ -149,7 +150,8 @@ namespace MediaBrowser.Server.Implementations.TV
SortBy = new[] { ItemSortBy.DatePlayed }, SortBy = new[] { ItemSortBy.DatePlayed },
SortOrder = SortOrder.Descending, SortOrder = SortOrder.Descending,
Limit = 1, Limit = 1,
IsVirtualItem = false IsVirtualItem = false,
ParentIndexNumberNotEquals = 0
}).FirstOrDefault(); }).FirstOrDefault();

Loading…
Cancel
Save