From f9542eb6ee55b29767fc77619db716d61a90c619 Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Mon, 13 Aug 2012 21:46:52 -0400 Subject: [PATCH] Fixed issue of only one person getting picked up --- MediaBrowser.Controller/Xml/BaseItemXmlParser.cs | 14 +++++++++++--- MediaBrowser.Model/Entities/Person.cs | 6 ++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs b/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs index fe2783c418..de9a94b034 100644 --- a/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs +++ b/MediaBrowser.Controller/Xml/BaseItemXmlParser.cs @@ -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; } diff --git a/MediaBrowser.Model/Entities/Person.cs b/MediaBrowser.Model/Entities/Person.cs index 831da4f658..690a2de857 100644 --- a/MediaBrowser.Model/Entities/Person.cs +++ b/MediaBrowser.Model/Entities/Person.cs @@ -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,