Fixed issue of only one person getting picked up
This commit is contained in:
parent
5f5f2fcdb4
commit
caffc4c3ec
|
@ -524,7 +524,7 @@ namespace MediaBrowser.Controller.Xml
|
|||
{
|
||||
case "Person":
|
||||
{
|
||||
list.Add(GetPersonFromXmlNode(reader));
|
||||
list.Add(GetPersonFromXmlNode(reader.ReadSubtree()));
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -649,14 +649,22 @@ namespace MediaBrowser.Controller.Xml
|
|||
{
|
||||
string type = reader.ReadString();
|
||||
|
||||
if (type == "Director")
|
||||
if (type.Equals("Director", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
person.PersonType = PersonType.Director;
|
||||
}
|
||||
else if (type == "Actor")
|
||||
else if (type.Equals("Actor", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,10 +17,16 @@ namespace MediaBrowser.Model.Entities
|
|||
public string Name { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public PersonType PersonType { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
}
|
||||
}
|
||||
|
||||
public enum PersonType
|
||||
{
|
||||
Other,
|
||||
Actor,
|
||||
Director,
|
||||
Writer,
|
||||
|
|
Loading…
Reference in New Issue
Block a user