jellyfin/MediaBrowser.Controller/Providers/MetadataResult.cs

35 lines
898 B
C#
Raw Normal View History

2015-06-29 01:10:45 +00:00
using MediaBrowser.Controller.Entities;
using System.Collections.Generic;
2015-03-13 19:37:19 +00:00
namespace MediaBrowser.Controller.Providers
{
public class MetadataResult<T>
{
2015-06-29 01:10:45 +00:00
public List<PersonInfo> People { get; set; }
2015-03-13 19:37:19 +00:00
public bool HasMetadata { get; set; }
public T Item { get; set; }
2015-06-29 01:10:45 +00:00
2015-07-24 02:48:10 +00:00
public void AddPerson(PersonInfo p)
2015-06-29 01:10:45 +00:00
{
2015-07-24 02:48:10 +00:00
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();
2015-06-29 01:10:45 +00:00
}
2015-03-13 19:37:19 +00:00
}
}