Sort file system entries by path in directory picker

This commit is contained in:
Luke Pulverenti 2013-04-18 11:57:14 -04:00
parent a8d8c598ca
commit 4a6378937f

View File

@ -108,7 +108,7 @@ namespace MediaBrowser.Api
if (path.StartsWith(NetworkPrefix, StringComparison.OrdinalIgnoreCase) && path.LastIndexOf('\\') == 1)
{
return ToOptimizedResult(GetNetworkShares(path).ToList());
return ToOptimizedResult(GetNetworkShares(path).OrderBy(i => i.Path).ToList());
}
// Reject invalid input
@ -117,7 +117,7 @@ namespace MediaBrowser.Api
throw new ArgumentException(string.Format("Invalid path: {0}", path));
}
return ToOptimizedResult(GetFileSystemEntries(request).ToList());
return ToOptimizedResult(GetFileSystemEntries(request).OrderBy(i => i.Path).ToList());
}
/// <summary>
@ -139,7 +139,7 @@ namespace MediaBrowser.Api
/// <returns>System.Object.</returns>
public object Get(GetNetworkDevices request)
{
var result = GetNetworkDevices().ToList();
var result = GetNetworkDevices().OrderBy(i => i.Path).ToList();
return ToOptimizedResult(result);
}