diff options
Diffstat (limited to 'MediaBrowser.Dlna/PlayTo/uBaseObject.cs')
| -rw-r--r-- | MediaBrowser.Dlna/PlayTo/uBaseObject.cs | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/MediaBrowser.Dlna/PlayTo/uBaseObject.cs b/MediaBrowser.Dlna/PlayTo/uBaseObject.cs index 5831e7dab5..f24f831473 100644 --- a/MediaBrowser.Dlna/PlayTo/uBaseObject.cs +++ b/MediaBrowser.Dlna/PlayTo/uBaseObject.cs @@ -1,6 +1,4 @@ -using System; -using System.Xml.Linq; - + namespace MediaBrowser.Dlna.PlayTo { public class uBaseObject @@ -20,47 +18,5 @@ namespace MediaBrowser.Dlna.PlayTo public string Url { get; set; } public string[] ProtocolInfo { get; set; } - - public static uBaseObject Create(XElement container) - { - if (container == null) - { - throw new ArgumentNullException("container"); - } - - return new uBaseObject - { - Id = container.Attribute(uPnpNamespaces.Id).Value, - ParentId = container.Attribute(uPnpNamespaces.ParentId).Value, - Title = container.GetValue(uPnpNamespaces.title), - IconUrl = container.GetValue(uPnpNamespaces.Artwork), - SecondText = "", - Url = container.GetValue(uPnpNamespaces.Res), - ProtocolInfo = GetProtocolInfo(container), - MetaData = container.ToString() - }; - } - - private static string[] GetProtocolInfo(XElement container) - { - if (container == null) - { - throw new ArgumentNullException("container"); - } - - var resElement = container.Element(uPnpNamespaces.Res); - - if (resElement != null) - { - var info = resElement.Attribute(uPnpNamespaces.ProtocolInfo); - - if (info != null && !string.IsNullOrWhiteSpace(info.Value)) - { - return info.Value.Split(':'); - } - } - - return new string[4]; - } } } |
