mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-22 13:40:37 +02:00
#26 - Cast/crew order should honour tags
This commit is contained in:
parent
18f2993627
commit
ef60822122
|
@ -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