check genres for null or whitespace

pull/702/head
Luke Pulverenti 12 years ago
parent e4d950e1a5
commit bba68471d7

@ -186,7 +186,9 @@ namespace MediaBrowser.Controller.Providers.MediaInfo
{ {
audio.Genres.Clear(); audio.Genres.Clear();
foreach (var genre in val.Split(new[] { '/', '|' }, StringSplitOptions.RemoveEmptyEntries)) foreach (var genre in val
.Split(new[] { '/', '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i)))
{ {
audio.AddGenre(genre); audio.AddGenre(genre);
} }

Loading…
Cancel
Save