The Free Software Media System - Server Backend & API
fixes #309 - TVDB episode XML ingestion of Writer and Director elements not dropping leading spaces
Luke Pulverentic5dc02ec4334
diff --git a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.csindex f849d85ec0..3fe3d6c00b 100644--- a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs+++ b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs@@ -313,6 +313,7 @@ namespace MediaBrowser.Providers.TVvar actors = doc.SafeGetString("//GuestStars");if (actors != null){+ // Sometimes tvdb actors have leading spacesforeach (var person in actors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).Where(i => !string.IsNullOrWhiteSpace(i)).Select(str => new PersonInfo { Type = PersonType.GuestStar, Name = str.Trim() }))@@ -325,6 +326,7 @@ namespace MediaBrowser.Providers.TVvar directors = doc.SafeGetString("//Director");if (directors != null){+ // Sometimes tvdb actors have leading spacesforeach (var person in directors.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).Where(i => !string.IsNullOrWhiteSpace(i)).Select(str => new PersonInfo { Type = PersonType.Director, Name = str.Trim() }))@@ -337,6 +339,7 @@ namespace MediaBrowser.Providers.TVvar writers = doc.SafeGetString("//Writer");if (writers != null){+ // Sometimes tvdb actors have leading spacesforeach (var person in writers.Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries).Where(i => !string.IsNullOrWhiteSpace(i)).Select(str => new PersonInfo { Type = PersonType.Writer, Name = str.Trim() }))diff --git a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs b/MediaBrowser.Providers/TV/RemoteSeriesProvider.csindex 96f0c5178a..2e4e53b3bf 100644--- a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs+++ b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs@@ -469,6 +469,7 @@ namespace MediaBrowser.Providers.TVstring actorRole = p.SafeGetString("Role");if (!string.IsNullOrWhiteSpace(actorName)){+ // Sometimes tvdb actors have leading spacesseries.AddPerson(new PersonInfo { Type = PersonType.Actor, Name = actorName.Trim(), Role = actorRole });if (ConfigurationManager.Configuration.SaveLocalMeta && actorsNode != null)