trim person names

This commit is contained in:
Luke Pulverenti
2013-07-31 08:09:23 -04:00
parent 9d2ed0d7f6
commit a6c1370a62
3 changed files with 6 additions and 5 deletions

View File

@@ -350,7 +350,7 @@ namespace MediaBrowser.Controller.Providers
case "Director":
{
foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v, Type = PersonType.Director }))
foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.Director }))
{
if (string.IsNullOrWhiteSpace(p.Name))
{
@@ -362,7 +362,7 @@ namespace MediaBrowser.Controller.Providers
}
case "Writer":
{
foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v, Type = PersonType.Writer }))
foreach (var p in SplitNames(reader.ReadElementContentAsString()).Select(v => new PersonInfo { Name = v.Trim(), Type = PersonType.Writer }))
{
if (string.IsNullOrWhiteSpace(p.Name))
{
@@ -911,7 +911,7 @@ namespace MediaBrowser.Controller.Providers
}
}
return names.Select(n => new PersonInfo { Name = n, Role = role, Type = type });
return names.Select(n => new PersonInfo { Name = n.Trim(), Role = role, Type = type });
}
/// <summary>