From 99c858c3386de8792079098fb5229f9703505995 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 29 Sep 2017 02:12:52 -0400 Subject: [PATCH 1/2] update recording file names --- Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 9ad99c2423..4a2836d597 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -1718,7 +1718,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { var parent = _fileSystem.GetDirectoryName(originalPath); var name = Path.GetFileNameWithoutExtension(originalPath); - name += "-" + index.ToString(CultureInfo.InvariantCulture); + name += " - " + index.ToString(CultureInfo.InvariantCulture); path = Path.ChangeExtension(Path.Combine(parent, name), Path.GetExtension(originalPath)); index++; From 134e74414d2644f1c345a2ef8876504aaaa69027 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 29 Sep 2017 02:13:05 -0400 Subject: [PATCH 2/2] update translations --- .../MediaEncoding/EncodingHelper.cs | 38 ++++++------------- SharedVersion.cs | 2 +- 2 files changed, 12 insertions(+), 28 deletions(-) diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index ee7b9f0800..861f4467df 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1531,11 +1531,18 @@ namespace MediaBrowser.Controller.MediaEncoding /// System.Int32. public int GetNumberOfThreads(EncodingJobInfo state, EncodingOptions encodingOptions, bool isWebm) { - var threads = GetNumberOfThreadsInternal(state, encodingOptions, isWebm); - - if (state.BaseRequest.CpuCoreLimit.HasValue && state.BaseRequest.CpuCoreLimit.Value > 0) + if (isWebm) { - threads = Math.Min(threads, state.BaseRequest.CpuCoreLimit.Value); + // Recommended per docs + return Math.Max(Environment.ProcessorCount - 1, 2); + } + + var threads = state.BaseRequest.CpuCoreLimit ?? encodingOptions.EncodingThreadCount; + + // Automatic + if (threads <= 0 || threads >= Environment.ProcessorCount) + { + return 0; } return threads; @@ -1957,29 +1964,6 @@ namespace MediaBrowser.Controller.MediaEncoding return null; } - /// - /// Gets the number of threads. - /// - /// System.Int32. - private int GetNumberOfThreadsInternal(EncodingJobInfo state, EncodingOptions encodingOptions, bool isWebm) - { - var threads = encodingOptions.EncodingThreadCount; - - if (isWebm) - { - // Recommended per docs - return Math.Max(Environment.ProcessorCount - 1, 2); - } - - // Automatic - if (threads == -1) - { - return 0; - } - - return threads; - } - public string GetSubtitleEmbedArguments(EncodingJobInfo state) { if (state.SubtitleStream == null || state.SubtitleDeliveryMethod != SubtitleDeliveryMethod.Embed) diff --git a/SharedVersion.cs b/SharedVersion.cs index e1a18d590d..ea2c949247 100644 --- a/SharedVersion.cs +++ b/SharedVersion.cs @@ -1,3 +1,3 @@ using System.Reflection; -[assembly: AssemblyVersion("3.2.32.10")] +[assembly: AssemblyVersion("3.2.32.11")]