trim tvdb actor names

pull/702/head
Luke Pulverenti 12 years ago
parent d017249d9e
commit baca9f0211

@ -313,7 +313,7 @@ namespace MediaBrowser.Providers.TV
{ {
foreach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) foreach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i)) .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); episode.AddPerson(person);
} }
@ -325,7 +325,7 @@ namespace MediaBrowser.Providers.TV
{ {
foreach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) foreach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i)) .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); episode.AddPerson(person);
} }
@ -337,7 +337,7 @@ namespace MediaBrowser.Providers.TV
{ {
foreach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries) foreach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i)) .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); episode.AddPerson(person);
} }

@ -469,7 +469,7 @@ namespace MediaBrowser.Providers.TV
string actorRole = p.SafeGetString("Role"); string actorRole = p.SafeGetString("Role");
if (!string.IsNullOrWhiteSpace(actorName)) 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) if (ConfigurationManager.Configuration.SaveLocalMeta && actorsNode != null)
{ {

Loading…
Cancel
Save