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