jellyfin/MediaBrowser.Movies/Metadata/MovieXmlParser.cs

33 lines
984 B
C#
Raw Normal View History

using System.Xml;
2012-07-11 23:55:27 -07:00
using MediaBrowser.Controller.Xml;
using MediaBrowser.Movies.Entities;
namespace MediaBrowser.Movies.Metadata
{
public class MovieXmlParser : BaseItemXmlParser<Movie>
{
protected override void FetchDataFromXmlNode(XmlReader reader, Movie item)
2012-07-11 23:55:27 -07:00
{
switch (reader.Name)
2012-07-11 23:55:27 -07:00
{
case "TMDbId":
item.TmdbId = reader.ReadElementContentAsString() ?? string.Empty;
2012-07-11 23:55:27 -07:00
break;
case "IMDB":
case "IMDbId":
string IMDbId = reader.ReadElementContentAsString() ?? string.Empty;
2012-07-11 23:55:27 -07:00
if (!string.IsNullOrEmpty(IMDbId))
{
item.ImdbId = IMDbId;
}
break;
default:
base.FetchDataFromXmlNode(reader, item);
2012-07-11 23:55:27 -07:00
break;
}
}
}
}