mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
fix include/exclude item type queries
This commit is contained in:
parent
3f9a412b02
commit
44ff7167f0
@ -357,6 +357,20 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
internal static IEnumerable<BaseItem> ApplyAdditionalFilters(GetItems request, IEnumerable<BaseItem> items)
|
||||
{
|
||||
// Exclude item types
|
||||
if (!string.IsNullOrEmpty(request.ExcludeItemTypes))
|
||||
{
|
||||
var vals = request.ExcludeItemTypes.Split(',');
|
||||
items = items.Where(f => !vals.Contains(f.GetType().Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
// Include item types
|
||||
if (!string.IsNullOrEmpty(request.IncludeItemTypes))
|
||||
{
|
||||
var vals = request.IncludeItemTypes.Split(',');
|
||||
items = items.Where(f => vals.Contains(f.GetType().Name, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
// Filter by Series Status
|
||||
if (!string.IsNullOrEmpty(request.SeriesStatus))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user