You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Api/HttpHandlers/ItemsWithPersonHandler.cs

33 lines
956 B

using System;
using System.Collections.Generic;
using MediaBrowser.Controller;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Api.HttpHandlers
{
/// <summary>
/// Gets all items within containing a person
/// </summary>
public class ItemsWithPersonHandler : ItemListHandler
{
protected override IEnumerable<BaseItem> ItemsToSerialize
{
get
{
Folder parent = ApiService.GetItemById(QueryString["id"]) as Folder;
PersonType? personType = null;
string type = QueryString["persontype"];
if (!string.IsNullOrEmpty(type))
{
personType = (PersonType)Enum.Parse(typeof(PersonType), type, true);
}
return Kernel.Instance.GetItemsWithPerson(parent, QueryString["name"], personType, UserId);
}
}
}
}