1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 07:22:35 +01:00
Sonarr/NzbDrone.Core/Tvdb/TvdbSeriesSearchItem.cs

50 lines
1.1 KiB
C#

using System;
using System.Linq;
using System.Xml.Serialization;
namespace NzbDrone.Core.Tvdb
{
public class TvdbSeriesSearchItem
{
[XmlElement]
public int id { get; set; }
[XmlElement]
public int seriesid { get; set; }
[XmlElement]
public string language { get; set; }
[XmlElement]
public string SeriesName { get; set; }
[XmlElement]
public string banner { get; set; }
[XmlElement]
public string Overview { get; set; }
[XmlElement(ElementName = "FirstAired")]
public string FirstAiredString
{
get { return FirstAired.HasValue ? FirstAired.Value.ToString("yyyy-MM-dd") : null; }
set
{
DateTime d;
if(DateTime.TryParse(value, out d))
FirstAired = d;
else
FirstAired = null;
}
}
[XmlIgnore]
public DateTime? FirstAired { get; set; }
[XmlElement]
public string IMDB_ID { get; set; }
[XmlElement]
public string zap2it_id { get; set; }
}
}