mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-16 02:18:54 -07:00
35 lines
898 B
C#
35 lines
898 B
C#
using MediaBrowser.Controller.Entities;
|
|
using System.Collections.Generic;
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
{
|
|
public class MetadataResult<T>
|
|
{
|
|
public List<PersonInfo> People { get; set; }
|
|
|
|
public bool HasMetadata { get; set; }
|
|
public T Item { get; set; }
|
|
|
|
public void AddPerson(PersonInfo p)
|
|
{
|
|
if (People == null)
|
|
{
|
|
People = new List<PersonInfo>();
|
|
}
|
|
|
|
PeopleHelper.AddPerson(People, p);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Not only does this clear, but initializes the list so that services can differentiate between a null list and zero people
|
|
/// </summary>
|
|
public void ResetPeople()
|
|
{
|
|
if (People == null)
|
|
{
|
|
People = new List<PersonInfo>();
|
|
}
|
|
People.Clear();
|
|
}
|
|
}
|
|
} |