jellyfin/Emby.Dlna/PlayTo/UpnpContainer.cs

29 lines
812 B
C#
Raw Normal View History

#pragma warning disable CS1591
using System;
2016-10-30 00:22:20 +02:00
using System.Xml.Linq;
2016-10-30 00:34:54 +02:00
using Emby.Dlna.Ssdp;
2016-10-30 00:22:20 +02:00
2016-10-30 00:34:54 +02:00
namespace Emby.Dlna.PlayTo
2016-10-30 00:22:20 +02:00
{
2020-08-20 21:04:57 +02:00
public class UpnpContainer : UBaseObject
2016-10-30 00:22:20 +02:00
{
2020-08-20 21:04:57 +02:00
public static UBaseObject Create(XElement container)
2016-10-30 00:22:20 +02:00
{
if (container == null)
{
throw new ArgumentNullException(nameof(container));
2016-10-30 00:22:20 +02:00
}
2020-08-20 21:04:57 +02:00
return new UBaseObject
2016-10-30 00:22:20 +02:00
{
2020-08-20 21:04:57 +02:00
Id = container.GetAttributeValue(UPnpNamespaces.Id),
ParentId = container.GetAttributeValue(UPnpNamespaces.ParentId),
Title = container.GetValue(UPnpNamespaces.Title),
IconUrl = container.GetValue(UPnpNamespaces.Artwork),
UpnpClass = container.GetValue(UPnpNamespaces.Class)
2016-10-30 00:22:20 +02:00
};
}
}
}