ContainerProfile.cs 825 B

12345678910111213141516171819202122232425262728293031
  1. using System.Collections.Generic;
  2. using System.Xml.Serialization;
  3. using MediaBrowser.Model.Dlna;
  4. namespace Emby.Dlna.ProfileSerialization
  5. {
  6. public class ContainerProfile
  7. {
  8. [XmlAttribute("type")]
  9. public DlnaProfileType Type { get; set; }
  10. public ProfileCondition[] Conditions { get; set; }
  11. [XmlAttribute("container")]
  12. public string Container { get; set; }
  13. public ContainerProfile()
  14. {
  15. Conditions = new ProfileCondition[] { };
  16. }
  17. public List<string> GetContainers()
  18. {
  19. List<string> list = new List<string>();
  20. foreach (string i in (Container ?? string.Empty).Split(','))
  21. {
  22. if (!string.IsNullOrEmpty(i)) list.Add(i);
  23. }
  24. return list;
  25. }
  26. }
  27. }