aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-08-13 02:34:55 -0400
committerGitHub <noreply@github.com>2016-08-13 02:34:55 -0400
commit9edd42c94cda3e2c025c01010da7f1d310903790 (patch)
treeb59bb33b1d3b549d4e6c8ada00bd9a2198004727 /MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs
parent3878da49a5323902a77c997fe5a409bfbc125c1c (diff)
parentc18b8ec608b44e04d17a1ef02a615b985ca00e7b (diff)
Merge pull request #2052 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs
index 9dd30edde..09a9a3b4e 100644
--- a/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs
+++ b/MediaBrowser.Server.Implementations/Library/Resolvers/PhotoResolver.cs
@@ -6,6 +6,7 @@ using System;
using System.IO;
using System.Linq;
using CommonIO;
+using MediaBrowser.Controller.Configuration;
namespace MediaBrowser.Server.Implementations.Library.Resolvers
{
@@ -40,7 +41,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
var filename = Path.GetFileNameWithoutExtension(args.Path);
// Make sure the image doesn't belong to a video file
- if (args.DirectoryService.GetFiles(Path.GetDirectoryName(args.Path)).Any(i => IsOwnedByMedia(i, filename)))
+ if (args.DirectoryService.GetFiles(Path.GetDirectoryName(args.Path)).Any(i => IsOwnedByMedia(args.GetLibraryOptions(), i, filename)))
{
return null;
}
@@ -56,9 +57,9 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers
return null;
}
- private bool IsOwnedByMedia(FileSystemMetadata file, string imageFilename)
+ private bool IsOwnedByMedia(LibraryOptions libraryOptions, FileSystemMetadata file, string imageFilename)
{
- if (_libraryManager.IsVideoFile(file.FullName) && imageFilename.StartsWith(Path.GetFileNameWithoutExtension(file.Name), StringComparison.OrdinalIgnoreCase))
+ if (_libraryManager.IsVideoFile(file.FullName, libraryOptions) && imageFilename.StartsWith(Path.GetFileNameWithoutExtension(file.Name), StringComparison.OrdinalIgnoreCase))
{
return true;
}