using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Logging; using System.Globalization; using System.Xml; namespace MediaBrowser.XbmcMetadata.Parsers { public class SeasonNfoParser : BaseNfoParser { public SeasonNfoParser(ILogger logger, IConfigurationManager config) : base(logger, config) { } /// /// Fetches the data from XML node. /// /// The reader. /// The item result. protected override void FetchDataFromXmlNode(XmlReader reader, LocalMetadataResult itemResult) { var item = itemResult.Item; switch (reader.Name) { case "seasonnumber": { var number = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(number)) { int num; if (int.TryParse(number, NumberStyles.Integer, CultureInfo.InvariantCulture, out num)) { item.IndexNumber = num; } } break; } default: base.FetchDataFromXmlNode(reader, itemResult); break; } } } }