Fixed issue of only one person getting picked up

pull/702/head
LukePulverenti Luke Pulverenti luke pulverenti 13 years ago
parent 5f5f2fcdb4
commit caffc4c3ec

@ -524,7 +524,7 @@ namespace MediaBrowser.Controller.Xml
{ {
case "Person": case "Person":
{ {
list.Add(GetPersonFromXmlNode(reader)); list.Add(GetPersonFromXmlNode(reader.ReadSubtree()));
break; break;
} }
@ -649,14 +649,22 @@ namespace MediaBrowser.Controller.Xml
{ {
string type = reader.ReadString(); string type = reader.ReadString();
if (type == "Director") if (type.Equals("Director", StringComparison.OrdinalIgnoreCase))
{ {
person.PersonType = PersonType.Director; person.PersonType = PersonType.Director;
} }
else if (type == "Actor") else if (type.Equals("Actor", StringComparison.OrdinalIgnoreCase))
{ {
person.PersonType = PersonType.Actor; person.PersonType = PersonType.Actor;
} }
else if (type.Equals("Writer", StringComparison.OrdinalIgnoreCase))
{
person.PersonType = PersonType.Writer;
}
else if (type.Equals("Producer", StringComparison.OrdinalIgnoreCase))
{
person.PersonType = PersonType.Producer;
}
break; break;
} }

@ -17,10 +17,16 @@ namespace MediaBrowser.Model.Entities
public string Name { get; set; } public string Name { get; set; }
public string Overview { get; set; } public string Overview { get; set; }
public PersonType PersonType { get; set; } public PersonType PersonType { get; set; }
public override string ToString()
{
return Name;
}
} }
public enum PersonType public enum PersonType
{ {
Other,
Actor, Actor,
Director, Director,
Writer, Writer,

Loading…
Cancel
Save