mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 03:26:07 +02:00
commit
93321730f4
3 changed files with 13 additions and 29 deletions
|
@ -1718,7 +1718,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
{
|
{
|
||||||
var parent = _fileSystem.GetDirectoryName(originalPath);
|
var parent = _fileSystem.GetDirectoryName(originalPath);
|
||||||
var name = Path.GetFileNameWithoutExtension(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));
|
path = Path.ChangeExtension(Path.Combine(parent, name), Path.GetExtension(originalPath));
|
||||||
index++;
|
index++;
|
||||||
|
|
|
@ -1531,11 +1531,18 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
/// <returns>System.Int32.</returns>
|
/// <returns>System.Int32.</returns>
|
||||||
public int GetNumberOfThreads(EncodingJobInfo state, EncodingOptions encodingOptions, bool isWebm)
|
public int GetNumberOfThreads(EncodingJobInfo state, EncodingOptions encodingOptions, bool isWebm)
|
||||||
{
|
{
|
||||||
var threads = GetNumberOfThreadsInternal(state, encodingOptions, isWebm);
|
if (isWebm)
|
||||||
|
|
||||||
if (state.BaseRequest.CpuCoreLimit.HasValue && state.BaseRequest.CpuCoreLimit.Value > 0)
|
|
||||||
{
|
{
|
||||||
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;
|
return threads;
|
||||||
|
@ -1957,29 +1964,6 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the number of threads.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>System.Int32.</returns>
|
|
||||||
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)
|
public string GetSubtitleEmbedArguments(EncodingJobInfo state)
|
||||||
{
|
{
|
||||||
if (state.SubtitleStream == null || state.SubtitleDeliveryMethod != SubtitleDeliveryMethod.Embed)
|
if (state.SubtitleStream == null || state.SubtitleDeliveryMethod != SubtitleDeliveryMethod.Embed)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.32.10")]
|
[assembly: AssemblyVersion("3.2.32.11")]
|
||||||
|
|
Loading…
Reference in a new issue