aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 1f82e7ef1..64e5d20c9 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -886,7 +886,14 @@ namespace MediaBrowser.Server.Implementations.Library
if (type == typeof(Person))
{
- subFolderPrefix = validFilename.Substring(0, 1);
+ var subFolderIndex = 0;
+
+ while (!char.IsLetterOrDigit(validFilename[subFolderIndex]))
+ {
+ subFolderIndex++;
+ }
+
+ subFolderPrefix = validFilename.Substring(subFolderIndex, 1);
}
var fullPath = string.IsNullOrEmpty(subFolderPrefix) ?