aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/Resolvers
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-03-29 02:27:52 -0400
committerGitHub <noreply@github.com>2017-03-29 02:27:52 -0400
commitcae9dfc1c990b6fc769f3a79c4bfe9122c3b256a (patch)
tree34d6c2fcf7da3d9b5e098328b0c79073947a9fe9 /Emby.Server.Implementations/Library/Resolvers
parent9f9e81089f5606e958bc8c3f0e4d73475d02372a (diff)
parentf6b94af438da8f8d3b3760c3e67eb24b09bafbfd (diff)
Merge pull request #2555 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Library/Resolvers')
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs2
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs15
2 files changed, 8 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs
index 384ed8dac..9a5d6b105 100644
--- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs
@@ -276,7 +276,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
return false;
}
- return directoryService.GetFiles(fullPath).Any(i => string.Equals(i.Extension, ".vob", StringComparison.OrdinalIgnoreCase));
+ return directoryService.GetFilePaths(fullPath).Any(i => string.Equals(Path.GetExtension(i), ".vob", StringComparison.OrdinalIgnoreCase));
}
/// <summary>
diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs
index df39e57ad..0968e8ea2 100644
--- a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs
@@ -5,10 +5,6 @@ using MediaBrowser.Model.Entities;
using System;
using System.IO;
using System.Linq;
-using MediaBrowser.Common.IO;
-using MediaBrowser.Model.IO;
-using MediaBrowser.Controller.Configuration;
-using MediaBrowser.Controller.IO;
using MediaBrowser.Model.Configuration;
namespace Emby.Server.Implementations.Library.Resolvers
@@ -45,7 +41,7 @@ namespace Emby.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(args.GetLibraryOptions(), i, filename)))
+ if (args.DirectoryService.GetFilePaths(Path.GetDirectoryName(args.Path)).Any(i => IsOwnedByMedia(args.GetLibraryOptions(), i, filename)))
{
return null;
}
@@ -61,11 +57,14 @@ namespace Emby.Server.Implementations.Library.Resolvers
return null;
}
- private bool IsOwnedByMedia(LibraryOptions libraryOptions, FileSystemMetadata file, string imageFilename)
+ private bool IsOwnedByMedia(LibraryOptions libraryOptions, string file, string imageFilename)
{
- if (_libraryManager.IsVideoFile(file.FullName, libraryOptions) && imageFilename.StartsWith(Path.GetFileNameWithoutExtension(file.Name), StringComparison.OrdinalIgnoreCase))
+ if (_libraryManager.IsVideoFile(file, libraryOptions))
{
- return true;
+ if (imageFilename.StartsWith(Path.GetFileNameWithoutExtension(file), StringComparison.OrdinalIgnoreCase))
+ {
+ return true;
+ }
}
return false;