diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index 612dc0d42..ebb79e96b 100644 --- a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -47,20 +47,30 @@ namespace MediaBrowser.Server.Implementations.Library { var parentFolderName = Path.GetFileName(Path.GetDirectoryName(args.Path)); - if (string.Equals(parentFolderName, BaseItem.ThemeSongsFolderName, StringComparison.OrdinalIgnoreCase) || string.Equals(parentFolderName, BaseItem.ThemeVideosFolderName, StringComparison.OrdinalIgnoreCase)) + if (string.Equals(parentFolderName, BaseItem.ThemeSongsFolderName, StringComparison.OrdinalIgnoreCase)) + { + return false; + } + if (string.Equals(parentFolderName, BaseItem.ThemeVideosFolderName, StringComparison.OrdinalIgnoreCase)) { return false; } // Drives will sometimes be hidden - if (args.Path.EndsWith(":\\", StringComparison.OrdinalIgnoreCase)) + if (args.Path.EndsWith(Path.VolumeSeparatorChar + "\\", StringComparison.OrdinalIgnoreCase)) + { + return false; + } + + // Shares will sometimes be hidden + if (args.Path.StartsWith("\\", StringComparison.OrdinalIgnoreCase)) { - if (new DriveInfo(args.Path).IsReady) + // Look for a share, e.g. \\server\movies + // Is there a better way to detect if a path is a share without using native code? + if (args.Path.Substring(2).Split(Path.DirectorySeparatorChar).Length == 2) { return false; } - - _logger.Error("Operating system reports drive is not ready: {0}", args.Path); } return true; |
