diff options
| -rw-r--r-- | Directory.Packages.props | 2 | ||||
| -rw-r--r-- | Emby.Naming/Common/NamingOptions.cs | 3 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 7 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/tr.json | 4 | ||||
| -rw-r--r-- | Jellyfin.Server/ServerSetupApp/SetupServer.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/TrickplayInfoDto.cs | 62 |
8 files changed, 92 insertions, 6 deletions
diff --git a/Directory.Packages.props b/Directory.Packages.props index f7ca48518..532202634 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -79,7 +79,7 @@ <PackageVersion Include="Swashbuckle.AspNetCore.ReDoc" Version="6.5.0" /> <PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" /> <PackageVersion Include="System.Globalization" Version="4.3.0" /> - <PackageVersion Include="System.Linq.Async" Version="6.0.1" /> + <PackageVersion Include="System.Linq.Async" Version="6.0.3" /> <PackageVersion Include="System.Text.Encoding.CodePages" Version="9.0.6" /> <PackageVersion Include="System.Text.Json" Version="9.0.6" /> <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.6" /> diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index dbb848603..192235bae 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -188,7 +188,8 @@ namespace Emby.Naming.Common "disk", "vol", "volume", - "part" + "part", + "act" }; ArtistSubfolders = new[] diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 9e0a6080d..cf886ae82 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -1065,7 +1065,12 @@ namespace Emby.Server.Implementations.Dto if (options.ContainsField(ItemFields.Trickplay)) { - dto.Trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult(); + var trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult(); + dto.Trickplay = trickplay.ToDictionary( + mediaStream => mediaStream.Key, + mediaStream => mediaStream.Value.ToDictionary( + width => width.Key, + width => new TrickplayInfoDto(width.Value))); } dto.ExtraType = video.ExtraType; diff --git a/Emby.Server.Implementations/Localization/Core/tr.json b/Emby.Server.Implementations/Localization/Core/tr.json index a3cf78fcb..3e3ca5a1a 100644 --- a/Emby.Server.Implementations/Localization/Core/tr.json +++ b/Emby.Server.Implementations/Localization/Core/tr.json @@ -136,5 +136,7 @@ "TaskMoveTrickplayImagesDescription": "Mevcut trickplay dosyalarını kütüphane ayarlarına göre taşır.", "TaskDownloadMissingLyrics": "Eksik şarkı sözlerini indir", "TaskDownloadMissingLyricsDescription": "Şarkı sözlerini indirir", - "TaskExtractMediaSegmentsDescription": "MediaSegment özelliği etkin olan eklentilerden medya segmentlerini çıkarır veya alır." + "TaskExtractMediaSegmentsDescription": "MediaSegment özelliği etkin olan eklentilerden medya segmentlerini çıkarır veya alır.", + "CleanupUserDataTask": "Kullanıcı verisi temizleme görevi", + "CleanupUserDataTaskDescription": "En az 90 gün boyunca artık mevcut olmayan medyadaki tüm kullanıcı verilerini (İzleme durumu, favori durumu vb.) temizler." } diff --git a/Jellyfin.Server/ServerSetupApp/SetupServer.cs b/Jellyfin.Server/ServerSetupApp/SetupServer.cs index 53e63f0f7..92e012940 100644 --- a/Jellyfin.Server/ServerSetupApp/SetupServer.cs +++ b/Jellyfin.Server/ServerSetupApp/SetupServer.cs @@ -19,7 +19,6 @@ using MediaBrowser.Model.System; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.HttpOverrides; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Diagnostics.HealthChecks; @@ -29,6 +28,8 @@ using Microsoft.Extensions.Primitives; using Morestachio; using Morestachio.Framework.IO.SingleStream; using Morestachio.Rendering; +using Serilog; +using ILogger = Microsoft.Extensions.Logging.ILogger; namespace Jellyfin.Server.ServerSetupApp; @@ -143,8 +144,10 @@ public sealed class SetupServer : IDisposable var config = _configurationManager.GetNetworkConfiguration()!; _startupServer = Host.CreateDefaultBuilder(["hostBuilder:reloadConfigOnChange=false"]) .UseConsoleLifetime() + .UseSerilog() .ConfigureServices(serv => { + serv.AddSingleton(this); serv.AddHealthChecks() .AddCheck<SetupHealthcheck>("StartupCheck"); serv.Configure<ForwardedHeadersOptions>(options => diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 26d4c4fcf..c9122ab46 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -2390,6 +2390,12 @@ namespace MediaBrowser.Controller.MediaEncoding || (requestHasSDR && videoStream.VideoRangeType == VideoRangeType.DOVIWithSDR) || (requestHasHDR10 && videoStream.VideoRangeType == VideoRangeType.HDR10Plus))) { + // If the video stream is in a static HDR format, don't allow copy if the client does not support HDR10 or HLG. + if (videoStream.VideoRangeType is VideoRangeType.HDR10 or VideoRangeType.HLG) + { + return false; + } + // Check complicated cases where we need to remove dynamic metadata // Conservatively refuse to copy if the encoder can't remove dynamic metadata, // but a removal is required for compatability reasons. @@ -4442,6 +4448,13 @@ namespace MediaBrowser.Controller.MediaEncoding var swapOutputWandH = doVppTranspose && swapWAndH; var hwScaleFilter = GetHwScaleFilter("vpp", "qsv", outFormat, swapOutputWandH, swpInW, swpInH, reqW, reqH, reqMaxW, reqMaxH); + // d3d11va doesn't support dynamic pool size, use vpp filter ctx to relay + // to prevent encoder async and bframes from exhausting the decoder pool. + if (!string.IsNullOrEmpty(hwScaleFilter) && isD3d11vaDecoder) + { + hwScaleFilter += ":passthrough=0"; + } + if (!string.IsNullOrEmpty(hwScaleFilter) && doVppTranspose) { hwScaleFilter += $":transpose={transposeDir}"; diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 937409111..8f223c12a 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -569,7 +569,7 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the trickplay manifest. /// </summary> /// <value>The trickplay manifest.</value> - public Dictionary<string, Dictionary<int, TrickplayInfo>> Trickplay { get; set; } + public Dictionary<string, Dictionary<int, TrickplayInfoDto>> Trickplay { get; set; } /// <summary> /// Gets or sets the type of the location. diff --git a/MediaBrowser.Model/Dto/TrickplayInfoDto.cs b/MediaBrowser.Model/Dto/TrickplayInfoDto.cs new file mode 100644 index 000000000..0c5f6e817 --- /dev/null +++ b/MediaBrowser.Model/Dto/TrickplayInfoDto.cs @@ -0,0 +1,62 @@ +using System; +using Jellyfin.Database.Implementations.Entities; + +namespace MediaBrowser.Model.Dto; + +/// <summary> +/// The trickplay api model. +/// </summary> +public record TrickplayInfoDto +{ + /// <summary> + /// Initializes a new instance of the <see cref="TrickplayInfoDto"/> class. + /// </summary> + /// <param name="info">The trickplay info.</param> + public TrickplayInfoDto(TrickplayInfo info) + { + ArgumentNullException.ThrowIfNull(info); + + Width = info.Width; + Height = info.Height; + TileWidth = info.TileWidth; + TileHeight = info.TileHeight; + ThumbnailCount = info.ThumbnailCount; + Interval = info.Interval; + Bandwidth = info.Bandwidth; + } + + /// <summary> + /// Gets the width of an individual thumbnail. + /// </summary> + public int Width { get; init; } + + /// <summary> + /// Gets the height of an individual thumbnail. + /// </summary> + public int Height { get; init; } + + /// <summary> + /// Gets the amount of thumbnails per row. + /// </summary> + public int TileWidth { get; init; } + + /// <summary> + /// Gets the amount of thumbnails per column. + /// </summary> + public int TileHeight { get; init; } + + /// <summary> + /// Gets the total amount of non-black thumbnails. + /// </summary> + public int ThumbnailCount { get; init; } + + /// <summary> + /// Gets the interval in milliseconds between each trickplay thumbnail. + /// </summary> + public int Interval { get; init; } + + /// <summary> + /// Gets the peak bandwidth usage in bits per second. + /// </summary> + public int Bandwidth { get; init; } +} |
