protected virtual MediaItem createMediaItemForMetaDataNode(XmlNode _nodeItem, XmlNamespaceManager _manager)
{
MediaItem mediaItem;
String raumfeldSection;
String upnpClass;
// check type of item by info we get on result, it may be a track, a album, artist info... aso..
// for this create own Classed derived from Media Information. In fact a list will consists only
// of items with one type. But this class should be able to handle differnt types of items in a list
upnpClass = this.xmlDocumentHelper.getChildNodeValue(_nodeItem, "upnp:class", _manager);
raumfeldSection = this.xmlDocumentHelper.getChildNodeValue(_nodeItem, "raumfeld:section", _manager);
if (String.IsNullOrWhiteSpace(upnpClass))
{
return(null);
}
mediaItem = MediaItem.newFromUpnpItemClass(upnpClass, raumfeldSection);
mediaItem.initValuesFromXMLNode(_nodeItem, _manager);
if (!isItemViewable(mediaItem))
{
return(null);
}
return(mediaItem);
}