diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs index c382f5df43..9e4e6233ac 100644 --- a/MediaBrowser.Api/EnvironmentService.cs +++ b/MediaBrowser.Api/EnvironmentService.cs @@ -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()); } /// @@ -139,7 +139,7 @@ namespace MediaBrowser.Api /// System.Object. public object Get(GetNetworkDevices request) { - var result = GetNetworkDevices().ToList(); + var result = GetNetworkDevices().OrderBy(i => i.Path).ToList(); return ToOptimizedResult(result); }