浏览代码

update ffmpeg with qsv-compatible version

Luke Pulverenti 9 年之前
父节点
当前提交
aff7309a08

+ 2 - 2
MediaBrowser.Api/Playback/Dash/MpegDashService.cs

@@ -352,9 +352,9 @@ namespace MediaBrowser.Api.Playback.Dash
 
             try
             {
-				foreach (var subfolder in FileSystem.GetDirectories(folder).ToList())
+                foreach (var subfolder in FileSystem.GetDirectoryPaths(folder).ToList())
                 {
-                    var subfolderName = Path.GetFileNameWithoutExtension(subfolder.FullName);
+                    var subfolderName = Path.GetFileNameWithoutExtension(subfolder);
                     int startNumber;
                     if (int.TryParse(subfolderName, NumberStyles.Any, UsCulture, out startNumber))
                     {

+ 18 - 0
MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs

@@ -499,5 +499,23 @@ namespace MediaBrowser.Common.Implementations.IO
         {
             return File.ReadAllText(path, encoding);
         }
+
+        public IEnumerable<string> GetDirectoryPaths(string path, bool recursive = false)
+        {
+            var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
+            return Directory.EnumerateDirectories(path, "*", searchOption);
+        }
+
+        public IEnumerable<string> GetFilePaths(string path, bool recursive = false)
+        {
+            var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
+            return Directory.EnumerateFiles(path, "*", searchOption);
+        }
+
+        public IEnumerable<string> GetFileSystemEntryPaths(string path, bool recursive = false)
+        {
+            var searchOption = recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly;
+            return Directory.EnumerateFileSystemEntries(path, "*", searchOption);
+        }
     }
 }

+ 6 - 0
MediaBrowser.Common/IO/IFileSystem.cs

@@ -176,5 +176,11 @@ namespace MediaBrowser.Common.IO
         void WriteAllText(string path, string text, Encoding encoding);
 
         string ReadAllText(string path, Encoding encoding);
+
+        IEnumerable<string> GetDirectoryPaths(string path, bool recursive = false);
+
+        IEnumerable<string> GetFilePaths(string path, bool recursive = false);
+
+        IEnumerable<string> GetFileSystemEntryPaths(string path, bool recursive = false);
     }
 }

+ 2 - 2
MediaBrowser.Providers/TV/TvdbSeriesProvider.cs

@@ -1167,10 +1167,10 @@ namespace MediaBrowser.Providers.TV
         {
             try
             {
-				foreach (var file in _fileSystem.GetFiles(path, true)
+                foreach (var file in _fileSystem.GetFilePaths(path, true)
                     .ToList())
                 {
-                    _fileSystem.DeleteFile(file.FullName);
+                    _fileSystem.DeleteFile(file);
                 }
             }
             catch (DirectoryNotFoundException)

+ 2 - 2
MediaBrowser.Server.Implementations/FileOrganization/TvFolderOrganizer.cs

@@ -111,8 +111,8 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
         {
             try
             {
-                return Directory
-                    .EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)
+                return _fileSystem
+                    .GetFileSystemEntryPaths(path)
                     .ToList();
             }
             catch (IOException ex)

+ 1 - 1
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -1165,7 +1165,7 @@ namespace MediaBrowser.Server.Implementations.Library
         /// <returns>IEnumerable{VirtualFolderInfo}.</returns>
         private IEnumerable<VirtualFolderInfo> GetView(string path)
         {
-            return Directory.EnumerateDirectories(path, "*", SearchOption.TopDirectoryOnly)
+            return _fileSystem.GetFileSystemEntryPaths(path)
                 .Select(dir => new VirtualFolderInfo
                 {
                     Name = Path.GetFileName(dir),

+ 5 - 5
MediaBrowser.Server.Startup.Common/FFMpeg/FFMpegDownloadInfo.cs

@@ -54,7 +54,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
 
                     info.FFMpegFilename = "ffmpeg.exe";
                     info.FFProbeFilename = "ffprobe.exe";
-                    info.Version = "20150916";
+                    info.Version = "20150918";
                     info.ArchiveType = "7z";
 
                     switch (environment.SystemArchitecture)
@@ -83,14 +83,14 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
                         case Architecture.X86_X64:
                             return new[]
                             {
-                                "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150916-git-cbbd906-win64-static.7z",
-                                "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150916-git-cbbd906-win64-static.7z"
+                                "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150918-win64.7z",
+                                "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150916-git-cbbd906-win64-static.7z"
                             };
                         case Architecture.X86:
                             return new[]
                             {
-                                "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150916-git-cbbd906-win32-static.7z",
-                                "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150916-git-cbbd906-win32-static.7z"
+                                "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150918-win32.7z",
+                                "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150916-git-cbbd906-win32-static.7z"
                             };
                     }
                     break;

+ 2 - 2
Nuget/MediaBrowser.Common.Internal.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Common.Internal</id>
-        <version>3.0.633</version>
+        <version>3.0.634</version>
         <title>MediaBrowser.Common.Internal</title>
         <authors>Luke</authors>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description>
         <copyright>Copyright © Emby 2013</copyright>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.633" />
+            <dependency id="MediaBrowser.Common" version="3.0.634" />
             <dependency id="NLog" version="3.2.1" />
             <dependency id="SimpleInjector" version="3.0.5" />
         </dependencies>

+ 1 - 1
Nuget/MediaBrowser.Common.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Common</id>
-        <version>3.0.633</version>
+        <version>3.0.634</version>
         <title>MediaBrowser.Common</title>
         <authors>Emby Team</authors>
         <owners>ebr,Luke,scottisafool</owners>

+ 1 - 1
Nuget/MediaBrowser.Model.Signed.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Model.Signed</id>
-        <version>3.0.633</version>
+        <version>3.0.634</version>
         <title>MediaBrowser.Model - Signed Edition</title>
         <authors>Emby Team</authors>
         <owners>ebr,Luke,scottisafool</owners>

+ 2 - 2
Nuget/MediaBrowser.Server.Core.nuspec

@@ -2,7 +2,7 @@
 <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
     <metadata>
         <id>MediaBrowser.Server.Core</id>
-        <version>3.0.633</version>
+        <version>3.0.634</version>
         <title>Media Browser.Server.Core</title>
         <authors>Emby Team</authors>
         <owners>ebr,Luke,scottisafool</owners>
@@ -12,7 +12,7 @@
         <description>Contains core components required to build plugins for Emby Server.</description>
         <copyright>Copyright © Emby 2013</copyright>
         <dependencies>
-            <dependency id="MediaBrowser.Common" version="3.0.633" />
+            <dependency id="MediaBrowser.Common" version="3.0.634" />
 			<dependency id="Interfaces.IO" version="1.0.0.5" />
         </dependencies>
     </metadata>