improve name matching

This commit is contained in:
Luke Pulverenti
2015-04-09 17:11:57 -04:00
parent 1b549adf0f
commit 1b600aee37
26 changed files with 81 additions and 43 deletions

View File

@@ -926,10 +926,8 @@ namespace MediaBrowser.Server.Implementations.Library
if (isArtist)
{
var validFilename = _fileSystem.GetValidFilename(name).Trim();
var existing = RootFolder
.GetRecursiveChildren(i => i is T && string.Equals(_fileSystem.GetValidFilename(i.Name).Trim(), validFilename, StringComparison.OrdinalIgnoreCase))
.GetRecursiveChildren(i => i is T && NameExtensions.AreEqual(i.Name, name))
.Cast<T>()
.FirstOrDefault();