jellyfin/MediaBrowser.Movies/Metadata/MovieXmlParser.cs
LukePulverenti Luke Pulverenti luke pulverenti b50f78e5da Initial check-in
2012-07-12 02:55:27 -04:00

36 lines
1022 B
C#

using System.Linq;
using System.Xml;
using MediaBrowser.Controller;
using MediaBrowser.Controller.Xml;
using MediaBrowser.Model.Entities;
using MediaBrowser.Movies.Entities;
namespace MediaBrowser.Movies.Metadata
{
public class MovieXmlParser : BaseItemXmlParser<Movie>
{
protected override void FetchDataFromXmlNode(XmlNode node, Movie item)
{
switch (node.Name)
{
case "TMDbId":
item.TmdbId = node.InnerText ?? string.Empty;
break;
case "IMDB":
case "IMDbId":
string IMDbId = node.InnerText ?? string.Empty;
if (!string.IsNullOrEmpty(IMDbId))
{
item.ImdbId = IMDbId;
}
break;
default:
base.FetchDataFromXmlNode(node, item);
break;
}
}
}
}