mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-15 20:20:25 +01:00
remove mono compiler directives
This commit is contained in:
@@ -3,6 +3,7 @@ using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
using ServiceStack;
|
||||
using System;
|
||||
@@ -101,7 +102,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
|
||||
filteredItems = FilterByLibraryItems(request, filteredItems, user, libraryItems);
|
||||
|
||||
filteredItems = ItemsService.ApplySortOrder(request, filteredItems, user, LibraryManager).Cast<TItemType>();
|
||||
filteredItems = LibraryManager.Sort(filteredItems, user, request.GetOrderBy(), request.SortOrder ?? SortOrder.Ascending).Cast<TItemType>();
|
||||
|
||||
var ibnItemsArray = filteredItems.ToList();
|
||||
|
||||
|
||||
@@ -96,6 +96,21 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
[ApiMember(Name = "IsPlayed", Description = "Optional filter by items that are played, or not.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]
|
||||
public bool? IsPlayed { get; set; }
|
||||
|
||||
public string[] GetMediaTypes()
|
||||
{
|
||||
return (MediaTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
public string[] GetIncludeItemTypes()
|
||||
{
|
||||
return (IncludeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
public string[] GetExcludeItemTypes()
|
||||
{
|
||||
return (ExcludeItemTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the filters.
|
||||
/// </summary>
|
||||
@@ -132,7 +147,7 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
/// Gets the order by.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{ItemSortBy}.</returns>
|
||||
public IEnumerable<string> GetOrderBy()
|
||||
public string[] GetOrderBy()
|
||||
{
|
||||
var val = SortBy;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -159,11 +159,14 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
{
|
||||
var people = itemsList.SelectMany(i => i.People.OrderBy(p => p.SortOrder ?? int.MaxValue).ThenBy(p => p.Type));
|
||||
|
||||
return personTypes.Length == 0 ?
|
||||
if (personTypes.Length > 0)
|
||||
{
|
||||
people = people.Where(p =>
|
||||
personTypes.Contains(p.Type ?? string.Empty, StringComparer.OrdinalIgnoreCase) ||
|
||||
personTypes.Contains(p.Role ?? string.Empty, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
people :
|
||||
|
||||
people.Where(p => personTypes.Contains(p.Type ?? string.Empty, StringComparer.OrdinalIgnoreCase) || personTypes.Contains(p.Role ?? string.Empty, StringComparer.OrdinalIgnoreCase));
|
||||
return people;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user