diff options
Diffstat (limited to 'MediaBrowser.Model/Dlna/ResponseProfile.cs')
| -rw-r--r-- | MediaBrowser.Model/Dlna/ResponseProfile.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Dlna/ResponseProfile.cs b/MediaBrowser.Model/Dlna/ResponseProfile.cs index e84095ffe5..c1735f3b7c 100644 --- a/MediaBrowser.Model/Dlna/ResponseProfile.cs +++ b/MediaBrowser.Model/Dlna/ResponseProfile.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using System.Xml.Serialization; namespace MediaBrowser.Model.Dlna @@ -33,17 +32,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; } } } |
