From 1fd0eb9687ef93d8c0ec9cff307b11f2d7393e74 Mon Sep 17 00:00:00 2001 From: Sleeps Date: Wed, 7 Oct 2026 13:53:28 +0100 Subject: [PATCH] Add index report plugin models --- .../SceneSearchAdminModels.cs | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/SceneSearchAdminModels.cs b/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/SceneSearchAdminModels.cs index 9533168..33c876e 100644 --- a/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/SceneSearchAdminModels.cs +++ b/jellyfin-plugin/Jellyfin.Plugin.SceneSearch/SceneSearchAdminModels.cs @@ -99,6 +99,91 @@ public sealed class SceneSearchIndexStatus } +public sealed class SceneSearchIndexReportResponse +{ + [JsonPropertyName("available")] + public bool Available { get; set; } + + [JsonPropertyName("kind")] + public string? Kind { get; set; } + + [JsonPropertyName("status")] + public string? Status { get; set; } + + [JsonPropertyName("started_at")] + public string? StartedAt { get; set; } + + [JsonPropertyName("finished_at")] + public string? FinishedAt { get; set; } + + [JsonPropertyName("error")] + public string? Error { get; set; } + + [JsonPropertyName("summary")] + public SceneSearchIndexReportSummary Summary { get; set; } = new(); + + [JsonPropertyName("category")] + public string? Category { get; set; } + + [JsonPropertyName("offset")] + public int Offset { get; set; } + + [JsonPropertyName("limit")] + public int Limit { get; set; } + + [JsonPropertyName("total")] + public int Total { get; set; } + + [JsonPropertyName("items")] + public List Items { get; set; } = []; +} + +public sealed class SceneSearchIndexReportSummary +{ + [JsonPropertyName("indexed")] + public int Indexed { get; set; } + + [JsonPropertyName("skipped")] + public int Skipped { get; set; } + + [JsonPropertyName("failed")] + public int Failed { get; set; } + + [JsonPropertyName("pruned")] + public int Pruned { get; set; } + + [JsonPropertyName("removed_libraries")] + public int RemovedLibraries { get; set; } +} + +public sealed class SceneSearchIndexReportItem +{ + [JsonPropertyName("status")] + public string Status { get; set; } = string.Empty; + + [JsonPropertyName("library_id")] + public string LibraryId { get; set; } = string.Empty; + + [JsonPropertyName("library")] + public string Library { get; set; } = string.Empty; + + [JsonPropertyName("item_id")] + public string ItemId { get; set; } = string.Empty; + + [JsonPropertyName("title")] + public string Title { get; set; } = string.Empty; + + [JsonPropertyName("reason")] + public string Reason { get; set; } = string.Empty; + + [JsonPropertyName("frames")] + public int? Frames { get; set; } + + [JsonPropertyName("preserved_annotations")] + public int? PreservedAnnotations { get; set; } +} + + public sealed class SceneSearchCaptionRequest { [JsonPropertyName("library_ids")]