2012-07-14 13:45:11 -07:00
|
|
|
|
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>
|
|
|
|
|
{
|
2012-07-14 13:45:11 -07:00
|
|
|
|
protected override void FetchDataFromXmlNode(XmlReader reader, Movie item)
|
2012-07-11 23:55:27 -07:00
|
|
|
|
{
|
2012-07-14 13:45:11 -07:00
|
|
|
|
switch (reader.Name)
|
2012-07-11 23:55:27 -07:00
|
|
|
|
{
|
|
|
|
|
case "TMDbId":
|
2012-07-20 12:03:11 -07:00
|
|
|
|
item.TmdbId = reader.ReadString();
|
2012-07-11 23:55:27 -07:00
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case "IMDB":
|
|
|
|
|
case "IMDbId":
|
2012-07-20 12:03:11 -07:00
|
|
|
|
string IMDbId = reader.ReadString();
|
2012-07-19 19:22:44 -07:00
|
|
|
|
if (!string.IsNullOrWhiteSpace(IMDbId))
|
2012-07-11 23:55:27 -07:00
|
|
|
|
{
|
|
|
|
|
item.ImdbId = IMDbId;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
default:
|
2012-07-14 13:45:11 -07:00
|
|
|
|
base.FetchDataFromXmlNode(reader, item);
|
2012-07-11 23:55:27 -07:00
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|