aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-11 12:10:41 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-06-11 12:10:41 -0400
commit7faf2be79b3e90e3fc6ff59f104d290593a042ba (patch)
treeaba3615d4503bc078f0e89de54076ce787f1cd45
parent2fdffde95e3f1910bdc26fbd73620d0559cde6eb (diff)
trim genre names from id3 tags
-rw-r--r--MediaBrowser.Providers/MediaInfo/FFProbeAudioInfoProvider.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfoProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfoProvider.cs
index 4cf7c1eb6..c18210901 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfoProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeAudioInfoProvider.cs
@@ -160,15 +160,18 @@ namespace MediaBrowser.Providers.MediaInfo
if (!string.IsNullOrEmpty(val))
{
+ // Sometimes the artist name is listed here, account for that
var studios =
val.Split(new[] { '/', '|' }, StringSplitOptions.RemoveEmptyEntries)
- .Where(i => !string.Equals(i, audio.Artist, StringComparison.OrdinalIgnoreCase) && !string.Equals(i, audio.AlbumArtist, StringComparison.OrdinalIgnoreCase));
+ .Where(i => !string.IsNullOrWhiteSpace(i))
+ .Where(i => !string.Equals(i, audio.Artist, StringComparison.OrdinalIgnoreCase) && !string.Equals(i, audio.AlbumArtist, StringComparison.OrdinalIgnoreCase));
audio.Studios.Clear();
foreach (var studio in studios)
{
- audio.AddStudio(studio);
+ // Account for sloppy tags by trimming
+ audio.AddStudio(studio.Trim());
}
}
}
@@ -190,7 +193,8 @@ namespace MediaBrowser.Providers.MediaInfo
.Split(new[] { '/', '|' }, StringSplitOptions.RemoveEmptyEntries)
.Where(i => !string.IsNullOrWhiteSpace(i)))
{
- audio.AddGenre(genre);
+ // Account for sloppy tags by trimming
+ audio.AddGenre(genre.Trim());
}
}
}