trim tvdb actor names

This commit is contained in:
Luke Pulverenti 2013-06-09 20:09:32 -04:00
parent d017249d9e
commit baca9f0211
2 changed files with 4 additions and 4 deletions

View File

@ -313,7 +313,7 @@ namespace MediaBrowser.Providers.TV
{
foreach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i))
.Select(str => new PersonInfo { Type = PersonType.GuestStar, Name = str }))
.Select(str => new PersonInfo { Type = PersonType.GuestStar, Name = str.Trim() }))
{
episode.AddPerson(person);
}
@ -325,7 +325,7 @@ namespace MediaBrowser.Providers.TV
{
foreach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i))
.Select(str => new PersonInfo { Type = PersonType.Director, Name = str }))
.Select(str => new PersonInfo { Type = PersonType.Director, Name = str.Trim() }))
{
episode.AddPerson(person);
}
@ -337,7 +337,7 @@ namespace MediaBrowser.Providers.TV
{
foreach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i))
.Select(str => new PersonInfo { Type = PersonType.Writer, Name = str }))
.Select(str => new PersonInfo { Type = PersonType.Writer, Name = str.Trim() }))
{
episode.AddPerson(person);
}

View File

@ -469,7 +469,7 @@ namespace MediaBrowser.Providers.TV
string actorRole = p.SafeGetString("Role");
if (!string.IsNullOrWhiteSpace(actorName))
{
series.AddPerson(new PersonInfo { Type = PersonType.Actor, Name = actorName, Role = actorRole });
series.AddPerson(new PersonInfo { Type = PersonType.Actor, Name = actorName.Trim(), Role = actorRole });
if (ConfigurationManager.Configuration.SaveLocalMeta && actorsNode != null)
{