aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
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 /MediaBrowser.Controller
parent9f9e81089f5606e958bc8c3f0e4d73475d02372a (diff)
parentf6b94af438da8f8d3b3760c3e67eb24b09bafbfd (diff)
Merge pull request #2555 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Entities/AggregateFolder.cs1
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs7
-rw-r--r--MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs14
-rw-r--r--MediaBrowser.Controller/Providers/DirectoryService.cs10
-rw-r--r--MediaBrowser.Controller/Providers/IDirectoryService.cs5
5 files changed, 24 insertions, 13 deletions
diff --git a/MediaBrowser.Controller/Entities/AggregateFolder.cs b/MediaBrowser.Controller/Entities/AggregateFolder.cs
index a6b9d860a0..a1de23c930 100644
--- a/MediaBrowser.Controller/Entities/AggregateFolder.cs
+++ b/MediaBrowser.Controller/Entities/AggregateFolder.cs
@@ -27,6 +27,7 @@ namespace MediaBrowser.Controller.Entities
/// <summary>
/// We don't support manual shortcuts
/// </summary>
+ [IgnoreDataMember]
protected override bool SupportsShortcutChildren
{
get
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index 52e150aa4c..c8ea4c506f 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1926,8 +1926,7 @@ namespace MediaBrowser.Controller.Entities
.Where(i => i.IsLocalFile)
.Select(i => System.IO.Path.GetDirectoryName(i.Path))
.Distinct(StringComparer.OrdinalIgnoreCase)
- .SelectMany(directoryService.GetFiles)
- .Select(i => i.FullName)
+ .SelectMany(directoryService.GetFilePaths)
.ToList();
var deletedImages = ImageInfos
@@ -2100,8 +2099,8 @@ namespace MediaBrowser.Controller.Entities
var extensions = new[] { ".nfo", ".xml", ".srt" }.ToList();
extensions.AddRange(SupportedImageExtensionsList);
- return FileSystem.GetFiles(System.IO.Path.GetDirectoryName(Path))
- .Where(i => extensions.Contains(i.Extension, StringComparer.OrdinalIgnoreCase) && System.IO.Path.GetFileNameWithoutExtension(i.FullName).StartsWith(filename, StringComparison.OrdinalIgnoreCase))
+ return FileSystem.GetFiles(System.IO.Path.GetDirectoryName(Path), extensions.ToArray(), false, false)
+ .Where(i => System.IO.Path.GetFileNameWithoutExtension(i.FullName).StartsWith(filename, StringComparison.OrdinalIgnoreCase))
.ToList();
}
diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
index b7b31509c5..530ff13430 100644
--- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
+++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs
@@ -1713,13 +1713,13 @@ namespace MediaBrowser.Controller.MediaEncoding
return "-c:v h264_qsv ";
}
break;
- //case "hevc":
- //case "h265":
- // if (_mediaEncoder.SupportsDecoder("hevc_qsv"))
- // {
- // return "-c:v hevc_qsv ";
- // }
- // break;
+ case "hevc":
+ case "h265":
+ if (_mediaEncoder.SupportsDecoder("hevc_qsv"))
+ {
+ return "-c:v hevc_qsv ";
+ }
+ break;
case "mpeg2video":
if (_mediaEncoder.SupportsDecoder("mpeg2_qsv"))
{
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 01218c293a..40093df3af 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -103,6 +103,16 @@ namespace MediaBrowser.Controller.Providers
return GetFileSystemEntries(path, clearCache).Where(i => !i.IsDirectory);
}
+ public IEnumerable<string> GetFilePaths(string path)
+ {
+ return _fileSystem.GetFilePaths(path);
+ }
+
+ public IEnumerable<string> GetFilePaths(string path, bool clearCache)
+ {
+ return _fileSystem.GetFilePaths(path);
+ }
+
public FileSystemMetadata GetFile(string path)
{
FileSystemMetadata file;
diff --git a/MediaBrowser.Controller/Providers/IDirectoryService.cs b/MediaBrowser.Controller/Providers/IDirectoryService.cs
index 54ae7e12be..f78d9cd6a6 100644
--- a/MediaBrowser.Controller/Providers/IDirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/IDirectoryService.cs
@@ -8,9 +8,10 @@ namespace MediaBrowser.Controller.Providers
public interface IDirectoryService
{
IEnumerable<FileSystemMetadata> GetFileSystemEntries(string path);
- IEnumerable<FileSystemMetadata> GetFiles(string path);
IEnumerable<FileSystemMetadata> GetDirectories(string path);
- IEnumerable<FileSystemMetadata> GetFiles(string path, bool clearCache);
+ IEnumerable<FileSystemMetadata> GetFiles(string path);
+ IEnumerable<string> GetFilePaths(string path);
+ IEnumerable<string> GetFilePaths(string path, bool clearCache);
FileSystemMetadata GetFile(string path);
Dictionary<string, FileSystemMetadata> GetFileSystemDictionary(string path);
}