aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/Resolvers
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-11-04 18:49:06 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-11-04 18:49:06 -0500
commit6aa3313bc05fe5a26cee8944c00489c022612069 (patch)
tree81330692c8f5f7fae10e1f9ec2f2f610aefa15f2 /MediaBrowser.Server.Implementations/Library/Resolvers
parent60067b4c29ccdfe19102a47eb9347715e1904b22 (diff)
make sure ._ osx files are properly ignored
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers')
-rw-r--r--MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs20
1 files changed, 12 insertions, 8 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
index 3252db505..e84fc242f 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
@@ -67,7 +67,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
string collectionType,
IDirectoryService directoryService)
{
- if (IsInvalid(parent, collectionType, files))
+ if (IsInvalid(parent, collectionType))
{
return null;
}
@@ -185,7 +185,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
{
var collectionType = args.GetCollectionType();
- if (IsInvalid(args.Parent, collectionType, args.FileSystemChildren))
+ if (IsInvalid(args.Parent, collectionType))
{
return null;
}
@@ -193,14 +193,18 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
// Find movies with their own folders
if (args.IsDirectory)
{
+ var files = args.FileSystemChildren
+ .Where(i => !LibraryManager.IgnoreFile(i, args.Parent))
+ .ToList();
+
if (string.Equals(collectionType, CollectionType.MusicVideos, StringComparison.OrdinalIgnoreCase))
{
- return FindMovie<MusicVideo>(args.Path, args.Parent, args.FileSystemChildren.ToList(), args.DirectoryService, collectionType);
+ return FindMovie<MusicVideo>(args.Path, args.Parent, files, args.DirectoryService, collectionType);
}
if (string.Equals(collectionType, CollectionType.HomeVideos, StringComparison.OrdinalIgnoreCase))
{
- return FindMovie<Video>(args.Path, args.Parent, args.FileSystemChildren.ToList(), args.DirectoryService, collectionType);
+ return FindMovie<Video>(args.Path, args.Parent, files, args.DirectoryService, collectionType);
}
if (string.IsNullOrEmpty(collectionType))
@@ -208,7 +212,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
// Owned items should just use the plain video type
if (args.Parent == null)
{
- return FindMovie<Video>(args.Path, args.Parent, args.FileSystemChildren.ToList(), args.DirectoryService, collectionType);
+ return FindMovie<Video>(args.Path, args.Parent, files, args.DirectoryService, collectionType);
}
if (args.HasParent<Series>())
@@ -216,12 +220,12 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
return null;
}
- return FindMovie<Movie>(args.Path, args.Parent, args.FileSystemChildren.ToList(), args.DirectoryService, collectionType);
+ return FindMovie<Movie>(args.Path, args.Parent, files, args.DirectoryService, collectionType);
}
if (string.Equals(collectionType, CollectionType.Movies, StringComparison.OrdinalIgnoreCase))
{
- return FindMovie<Movie>(args.Path, args.Parent, args.FileSystemChildren.ToList(), args.DirectoryService, collectionType);
+ return FindMovie<Movie>(args.Path, args.Parent, files, args.DirectoryService, collectionType);
}
return null;
@@ -494,7 +498,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
};
}
- private bool IsInvalid(Folder parent, string collectionType, IEnumerable<FileSystemMetadata> files)
+ private bool IsInvalid(Folder parent, string collectionType)
{
if (parent != null)
{