fixes #595 - Linux/Unix file quantity limitation for ImagesByName/People folder

This commit is contained in:
Luke Pulverenti
2013-10-23 12:51:51 -04:00
parent ffcfa2d858
commit 73b294b4ce
3 changed files with 25 additions and 9 deletions

View File

@@ -703,7 +703,21 @@ namespace MediaBrowser.Server.Implementations.Library
var validFilename = FileSystem.GetValidFilename(name);
var key = Path.Combine(path, validFilename);
string subFolderPrefix = null;
if (typeof(T) == typeof(Person) && ConfigurationManager.Configuration.EnablePeoplePrefixSubFolders)
{
subFolderPrefix = validFilename.Substring(0, 1);
if (string.IsNullOrWhiteSpace(subFolderPrefix))
{
subFolderPrefix = "0";
}
}
var key = string.IsNullOrEmpty(subFolderPrefix) ?
Path.Combine(path, validFilename) :
Path.Combine(path, subFolderPrefix, validFilename);
BaseItem obj;