jellyfin-server/MediaBrowser.Model/Dlna/ContainerProfile.cs

27 lines
674 B
C#
Raw Normal View History

2014-03-23 16:42:02 +00:00
using System.Collections.Generic;
using System.Linq;
2014-03-26 15:06:48 +00:00
using System.Xml.Serialization;
2014-03-23 16:42:02 +00:00
2014-04-01 22:23:07 +00:00
namespace MediaBrowser.Model.Dlna
2014-03-23 16:42:02 +00:00
{
public class ContainerProfile
{
2014-03-26 15:06:48 +00:00
[XmlAttribute("type")]
2014-03-23 16:42:02 +00:00
public DlnaProfileType Type { get; set; }
public ProfileCondition[] Conditions { get; set; }
2014-03-26 15:06:48 +00:00
[XmlAttribute("container")]
2014-03-23 16:42:02 +00:00
public string Container { get; set; }
public ContainerProfile()
{
Conditions = new ProfileCondition[] { };
}
public List<string> GetContainers()
{
2014-04-01 22:23:07 +00:00
return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList();
2014-03-23 16:42:02 +00:00
}
}
}