diff options
Diffstat (limited to 'MediaBrowser.Model/Dlna/DirectPlayProfile.cs')
| -rw-r--r-- | MediaBrowser.Model/Dlna/DirectPlayProfile.cs | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs index e195c9450..183299425 100644 --- a/MediaBrowser.Model/Dlna/DirectPlayProfile.cs +++ b/MediaBrowser.Model/Dlna/DirectPlayProfile.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna @@ -20,33 +19,32 @@ namespace MediaBrowser.Model.Dlna public List<string> GetContainers() { - return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList(); + List<string> list = new List<string>(); + foreach (string i in (Container ?? string.Empty).Split(',')) + { + if (!string.IsNullOrEmpty(i)) list.Add(i); + } + return list; } public List<string> GetAudioCodecs() { - return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList(); + List<string> list = new List<string>(); + foreach (string i in (AudioCodec ?? string.Empty).Split(',')) + { + if (!string.IsNullOrEmpty(i)) list.Add(i); + } + return list; } public List<string> GetVideoCodecs() { - return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrEmpty(i)).ToList(); + List<string> list = new List<string>(); + foreach (string i in (VideoCodec ?? string.Empty).Split(',')) + { + if (!string.IsNullOrEmpty(i)) list.Add(i); + } + return list; } } - - public class XmlAttribute - { - [XmlAttribute("name")] - public string Name { get; set; } - - [XmlAttribute("value")] - public string Value { get; set; } - } - - public enum DlnaProfileType - { - Audio = 0, - Video = 1, - Photo = 2 - } } |
