mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
#26 - Cast/crew order should honour tags
This commit is contained in:
parent
18f2993627
commit
ef60822122
1 changed files with 7 additions and 2 deletions
|
@ -86,9 +86,14 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
/// <returns>IEnumerable{PersonInfo}.</returns>
|
||||
private IEnumerable<PersonInfo> GetAllPeople(IEnumerable<BaseItem> itemsList, string[] personTypes)
|
||||
{
|
||||
var people = itemsList.SelectMany(i => i.People.OrderBy(p => p.Type));
|
||||
|
||||
|
||||
return personTypes.Length == 0 ?
|
||||
itemsList.SelectMany(i => i.People) :
|
||||
itemsList.SelectMany(i => i.People.Where(p => personTypes.Contains(p.Type ?? string.Empty, StringComparer.OrdinalIgnoreCase)));
|
||||
|
||||
people :
|
||||
|
||||
people.Where(p => personTypes.Contains(p.Type ?? string.Empty, StringComparer.OrdinalIgnoreCase));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in a new issue