diff options
| -rw-r--r-- | Emby.Server.Implementations/Dto/DtoService.cs | 7 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/he.json | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/ja.json | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/sk.json | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/tr.json | 4 | ||||
| -rw-r--r-- | Jellyfin.Server/ServerSetupApp/SetupServer.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/TrickplayInfoDto.cs | 62 |
8 files changed, 85 insertions, 7 deletions
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/he.json b/Emby.Server.Implementations/Localization/Core/he.json index 1809c9d3f..7293a0d38 100644 --- a/Emby.Server.Implementations/Localization/Core/he.json +++ b/Emby.Server.Implementations/Localization/Core/he.json @@ -136,5 +136,7 @@ "TaskMoveTrickplayImages": "העברת מיקום של תמונות Trickplay", "TaskExtractMediaSegments": "סריקת מדיה", "TaskExtractMediaSegmentsDescription": "מחלץ חלקי מדיה מתוספים המאפשרים זאת.", - "TaskMoveTrickplayImagesDescription": "הזזת קבצי Trickplay קיימים בהתאם להגדרות הספרייה." + "TaskMoveTrickplayImagesDescription": "הזזת קבצי Trickplay קיימים בהתאם להגדרות הספרייה.", + "CleanupUserDataTaskDescription": "ניקוי כל המידע של המשתמש (מצב צפייה, מועדפים וכו) ממדיה שאינה קיימת מעל 90 יום.", + "CleanupUserDataTask": "משימת ניקוי מידע משתמש" } diff --git a/Emby.Server.Implementations/Localization/Core/ja.json b/Emby.Server.Implementations/Localization/Core/ja.json index 14a576592..d564d54ce 100644 --- a/Emby.Server.Implementations/Localization/Core/ja.json +++ b/Emby.Server.Implementations/Localization/Core/ja.json @@ -135,5 +135,7 @@ "TaskMoveTrickplayImages": "Trickplayの画像を移動", "TaskMoveTrickplayImagesDescription": "ライブラリ設定によりTrickplayのファイルを移動。", "TaskDownloadMissingLyrics": "失われた歌詞をダウンロード", - "TaskExtractMediaSegmentsDescription": "MediaSegment 対応プラグインからメディア セグメントを抽出または取得します。" + "TaskExtractMediaSegmentsDescription": "MediaSegment 対応プラグインからメディア セグメントを抽出または取得します。", + "CleanupUserDataTask": "ユーザーデータのクリーンアップタスク", + "CleanupUserDataTaskDescription": "90日以上存在しないメディアに対して、視聴状態やお気に入り状態などのユーザーデータをすべて削除します。" } diff --git a/Emby.Server.Implementations/Localization/Core/sk.json b/Emby.Server.Implementations/Localization/Core/sk.json index 66d8bf899..1de78eeae 100644 --- a/Emby.Server.Implementations/Localization/Core/sk.json +++ b/Emby.Server.Implementations/Localization/Core/sk.json @@ -136,5 +136,7 @@ "TaskMoveTrickplayImages": "Presunúť umiestnenie obrázkov Trickplay", "TaskMoveTrickplayImagesDescription": "Presunie existujúce súbory Trickplay podľa nastavení knižnice.", "TaskDownloadMissingLyrics": "Stiahnuť chýbajúce texty piesní", - "TaskDownloadMissingLyricsDescription": "Stiahne texty pre piesne" + "TaskDownloadMissingLyricsDescription": "Stiahne texty pre piesne", + "CleanupUserDataTask": "Prečistiť používateľské dáta", + "CleanupUserDataTaskDescription": "Vyčistí všetky dáta používateľa (stav sledovania, stav obľúbených atď.) z médií, ktoré už neexistujú aspoň 90 dní." } 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.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; } +} |
