fixes #397 - WB web client - Missing person metadata field

This commit is contained in:
Luke Pulverenti
2013-07-29 14:33:48 -04:00
parent 2646ce696b
commit f7bce0bc3c
6 changed files with 70 additions and 17 deletions

View File

@@ -1279,11 +1279,6 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException("location");
}
if (ProductionLocations == null)
{
ProductionLocations = new List<string>();
}
if (!ProductionLocations.Contains(location, StringComparer.OrdinalIgnoreCase))
{
ProductionLocations.Add(location);

View File

@@ -211,6 +211,18 @@ namespace MediaBrowser.Controller.Providers
break;
}
case "PlaceOfBirth":
{
var val = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(val))
{
item.ProductionLocations = new List<string> { val };
}
break;
}
case "Website":
{
var val = reader.ReadElementContentAsString();
@@ -465,6 +477,24 @@ namespace MediaBrowser.Controller.Providers
break;
}
case "DeathDate":
case "EndDate":
{
var firstAired = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(firstAired))
{
DateTime airDate;
if (DateTime.TryParse(firstAired, out airDate) && airDate.Year > 1850)
{
item.EndDate = airDate.ToUniversalTime();
}
}
break;
}
case "TvDbId":
var tvdbId = reader.ReadElementContentAsString();
if (!string.IsNullOrWhiteSpace(tvdbId))