aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Api
diff options
context:
space:
mode:
Diffstat (limited to 'Jellyfin.Api')
-rw-r--r--Jellyfin.Api/Controllers/DynamicHlsController.cs5
-rw-r--r--Jellyfin.Api/Controllers/ItemLookupController.cs4
-rw-r--r--Jellyfin.Api/Helpers/DynamicHlsHelper.cs6
-rw-r--r--Jellyfin.Api/WebSocketListeners/ScheduledTasksWebSocketListener.cs12
4 files changed, 16 insertions, 11 deletions
diff --git a/Jellyfin.Api/Controllers/DynamicHlsController.cs b/Jellyfin.Api/Controllers/DynamicHlsController.cs
index ba9a57f1db..b41e239255 100644
--- a/Jellyfin.Api/Controllers/DynamicHlsController.cs
+++ b/Jellyfin.Api/Controllers/DynamicHlsController.cs
@@ -1705,12 +1705,13 @@ namespace Jellyfin.Api.Controllers
return audioTranscodeParams;
}
- // dts, flac and opus are experimental in mp4 muxer
+ // dts, flac, opus and truehd are experimental in mp4 muxer
var strictArgs = string.Empty;
if (string.Equals(state.ActualOutputAudioCodec, "flac", StringComparison.OrdinalIgnoreCase)
|| string.Equals(state.ActualOutputAudioCodec, "opus", StringComparison.OrdinalIgnoreCase)
- || string.Equals(state.ActualOutputAudioCodec, "dts", StringComparison.OrdinalIgnoreCase))
+ || string.Equals(state.ActualOutputAudioCodec, "dts", StringComparison.OrdinalIgnoreCase)
+ || string.Equals(state.ActualOutputAudioCodec, "truehd", StringComparison.OrdinalIgnoreCase))
{
strictArgs = " -strict -2";
}
diff --git a/Jellyfin.Api/Controllers/ItemLookupController.cs b/Jellyfin.Api/Controllers/ItemLookupController.cs
index 34893d682d..b6c5504db5 100644
--- a/Jellyfin.Api/Controllers/ItemLookupController.cs
+++ b/Jellyfin.Api/Controllers/ItemLookupController.cs
@@ -248,10 +248,10 @@ namespace Jellyfin.Api.Controllers
{
var item = _libraryManager.GetItemById(itemId);
_logger.LogInformation(
- "Setting provider id's to item {0}-{1}: {2}",
+ "Setting provider id's to item {ItemId}-{ItemName}: {@ProviderIds}",
item.Id,
item.Name,
- JsonSerializer.Serialize(searchResult.ProviderIds));
+ searchResult.ProviderIds);
// Since the refresh process won't erase provider Ids, we need to set this explicitly now.
item.ProviderIds = searchResult.ProviderIds;
diff --git a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
index 010b181f70..4a338efff2 100644
--- a/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
+++ b/Jellyfin.Api/Helpers/DynamicHlsHelper.cs
@@ -9,6 +9,7 @@ using System.Threading;
using System.Threading.Tasks;
using Jellyfin.Api.Extensions;
using Jellyfin.Api.Models.StreamingDtos;
+using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Extensions;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
@@ -204,8 +205,11 @@ namespace Jellyfin.Api.Helpers
builder.Append(flacWaPlaylist);
}
+ var encodingOptions = _serverConfigurationManager.GetEncodingOptions();
+
// Provide SDR HEVC entrance for backward compatibility.
- if (EncodingHelper.IsCopyCodec(state.OutputVideoCodec)
+ if (encodingOptions.AllowHevcEncoding
+ && EncodingHelper.IsCopyCodec(state.OutputVideoCodec)
&& !string.IsNullOrEmpty(state.VideoStream.VideoRange)
&& string.Equals(state.VideoStream.VideoRange, "HDR", StringComparison.OrdinalIgnoreCase)
&& string.Equals(state.ActualOutputVideoCodec, "hevc", StringComparison.OrdinalIgnoreCase))
diff --git a/Jellyfin.Api/WebSocketListeners/ScheduledTasksWebSocketListener.cs b/Jellyfin.Api/WebSocketListeners/ScheduledTasksWebSocketListener.cs
index 94df23e569..7c6ce3273e 100644
--- a/Jellyfin.Api/WebSocketListeners/ScheduledTasksWebSocketListener.cs
+++ b/Jellyfin.Api/WebSocketListeners/ScheduledTasksWebSocketListener.cs
@@ -64,21 +64,21 @@ namespace Jellyfin.Api.WebSocketListeners
base.Dispose(dispose);
}
- private void OnTaskCompleted(object? sender, TaskCompletionEventArgs e)
+ private async void OnTaskCompleted(object? sender, TaskCompletionEventArgs e)
{
- SendData(true);
e.Task.TaskProgress -= OnTaskProgress;
+ await SendData(true).ConfigureAwait(false);
}
- private void OnTaskExecuting(object? sender, GenericEventArgs<IScheduledTaskWorker> e)
+ private async void OnTaskExecuting(object? sender, GenericEventArgs<IScheduledTaskWorker> e)
{
- SendData(true);
+ await SendData(true).ConfigureAwait(false);
e.Argument.TaskProgress += OnTaskProgress;
}
- private void OnTaskProgress(object? sender, GenericEventArgs<double> e)
+ private async void OnTaskProgress(object? sender, GenericEventArgs<double> e)
{
- SendData(false);
+ await SendData(false).ConfigureAwait(false);
}
}
}