diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-08-27 16:29:45 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-08-27 16:29:45 -0400 |
| commit | 11f26b1d3677c68e45673de0a94a9cac1453a6ab (patch) | |
| tree | 869e29cd12bd8a59ee9d5e9dd749c81d089ddcf1 /MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | |
| parent | e51a38a93d33fbfab7226b212d9390a5d45be503 (diff) | |
fixes #427 - mac ds store path
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index 9166067c3..c2e87cbd7 100644 --- a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -35,9 +35,11 @@ namespace MediaBrowser.Server.Implementations.Library /// <returns><c>true</c> if XXXX, <c>false</c> otherwise</returns> public bool ShouldIgnore(ItemResolveArgs args) { + var filename = args.FileInfo.Name; + // Handle mac .DS_Store // https://github.com/MediaBrowser/MediaBrowser/issues/427 - if (args.Path.IndexOf("._", StringComparison.OrdinalIgnoreCase) == 0) + if (filename.IndexOf("._", StringComparison.OrdinalIgnoreCase) == 0) { return true; } @@ -78,8 +80,6 @@ namespace MediaBrowser.Server.Implementations.Library if (args.IsDirectory) { - var filename = args.FileInfo.Name; - // Ignore any folders in our list if (IgnoreFolders.ContainsKey(filename)) { @@ -107,8 +107,6 @@ namespace MediaBrowser.Server.Implementations.Library { if (args.Parent != null) { - var filename = args.FileInfo.Name; - if (string.Equals(Path.GetFileNameWithoutExtension(filename), BaseItem.ThemeSongFilename) && EntityResolutionHelper.IsAudioFile(filename)) { return true; |
