diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-25 14:32:58 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-25 14:32:58 -0400 |
| commit | d74e3b2dea894a7cdc3defac418069081dd2ae22 (patch) | |
| tree | 9618eea91bf12790b51eeb0138a01f1641968043 /MediaBrowser.Controller/IO/FileData.cs | |
| parent | c8a735bcb1ba71e9501d18b3044aa30793ff97ee (diff) | |
connect updates
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/FileData.cs | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index 4ee8a810b..fb0f07331 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -25,7 +25,13 @@ namespace MediaBrowser.Controller.IO /// <param name="resolveShortcuts">if set to <c>true</c> [resolve shortcuts].</param> /// <returns>Dictionary{System.StringFileSystemInfo}.</returns> /// <exception cref="System.ArgumentNullException">path</exception> - public static Dictionary<string, FileSystemInfo> GetFilteredFileSystemEntries(IDirectoryService directoryService, string path, IFileSystem fileSystem, ILogger logger, ItemResolveArgs args, int flattenFolderDepth = 0, bool resolveShortcuts = true) + public static Dictionary<string, FileSystemInfo> GetFilteredFileSystemEntries(IDirectoryService directoryService, + string path, + IFileSystem fileSystem, + ILogger logger, + ItemResolveArgs args, + int flattenFolderDepth = 0, + bool resolveShortcuts = true) { if (string.IsNullOrEmpty(path)) { @@ -36,21 +42,13 @@ namespace MediaBrowser.Controller.IO throw new ArgumentNullException("args"); } - var entries = directoryService.GetFileSystemEntries(path); - if (!resolveShortcuts && flattenFolderDepth == 0) { - // Seeing dupes on some users file system for some reason - var dictionary = new Dictionary<string, FileSystemInfo>(StringComparer.OrdinalIgnoreCase); - - foreach (var info in entries) - { - dictionary[info.FullName] = info; - } - - return dictionary; + return directoryService.GetFileSystemDictionary(path); } + var entries = directoryService.GetFileSystemEntries(path); + var dict = new Dictionary<string, FileSystemInfo>(StringComparer.OrdinalIgnoreCase); foreach (var entry in entries) |
