mirror of
https://github.com/MrSleeps/jellyfin-scene-search.git
synced 2026-11-17 23:41:28 +00:00
270 lines
6.8 KiB
C#
270 lines
6.8 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.SceneSearch;
|
|
|
|
public sealed class SceneSearchLibraryListResponse
|
|
{
|
|
[JsonPropertyName("libraries")]
|
|
public List<SceneSearchLibrary> Libraries { get; set; } = [];
|
|
}
|
|
|
|
public sealed class SceneSearchLibrary
|
|
{
|
|
[JsonPropertyName("id")]
|
|
public string Id { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; } = string.Empty;
|
|
|
|
[JsonPropertyName("indexed_items")]
|
|
public int IndexedItems { get; set; }
|
|
|
|
[JsonPropertyName("indexed_frames")]
|
|
public int IndexedFrames { get; set; }
|
|
}
|
|
|
|
public sealed class SceneSearchIndexRequest
|
|
{
|
|
[JsonPropertyName("library_ids")]
|
|
public List<string> LibraryIds { get; set; } = [];
|
|
|
|
[JsonPropertyName("force")]
|
|
public bool Force { get; set; }
|
|
}
|
|
|
|
public sealed class SceneSearchIndexStatus
|
|
{
|
|
[JsonPropertyName("running")]
|
|
public bool Running { get; set; }
|
|
|
|
[JsonPropertyName("stage")]
|
|
public string Stage { get; set; } = "idle";
|
|
|
|
[JsonPropertyName("started_at")]
|
|
public string? StartedAt { get; set; }
|
|
|
|
[JsonPropertyName("finished_at")]
|
|
public string? FinishedAt { get; set; }
|
|
|
|
[JsonPropertyName("error")]
|
|
public string? Error { get; set; }
|
|
|
|
[JsonPropertyName("library")]
|
|
public string? Library { get; set; }
|
|
|
|
[JsonPropertyName("item")]
|
|
public string? Item { get; set; }
|
|
|
|
[JsonPropertyName("library_number")]
|
|
public int? LibraryNumber { get; set; }
|
|
|
|
[JsonPropertyName("library_total")]
|
|
public int? LibraryTotal { get; set; }
|
|
|
|
[JsonPropertyName("item_number")]
|
|
public int? ItemNumber { get; set; }
|
|
|
|
[JsonPropertyName("item_total")]
|
|
public int? ItemTotal { get; set; }
|
|
|
|
[JsonPropertyName("frames_processed")]
|
|
public int? FramesProcessed { get; set; }
|
|
|
|
[JsonPropertyName("frames_total")]
|
|
public int? FramesTotal { get; set; }
|
|
|
|
[JsonPropertyName("overall_items_total")]
|
|
public int? OverallItemsTotal { get; set; }
|
|
|
|
[JsonPropertyName("overall_items_completed")]
|
|
public int? OverallItemsCompleted { get; set; }
|
|
|
|
[JsonPropertyName("overall_percent")]
|
|
public double? OverallPercent { get; set; }
|
|
|
|
[JsonPropertyName("documents_processed")]
|
|
public int? DocumentsProcessed { get; set; }
|
|
|
|
[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; }
|
|
}
|
|
|
|
|
|
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<SceneSearchIndexReportItem> 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")]
|
|
public List<string> LibraryIds { get; set; } = [];
|
|
|
|
[JsonPropertyName("force")]
|
|
public bool Force { get; set; }
|
|
}
|
|
|
|
public sealed class SceneSearchCaptionStatus
|
|
{
|
|
[JsonPropertyName("running")]
|
|
public bool Running { get; set; }
|
|
|
|
[JsonPropertyName("stage")]
|
|
public string Stage { get; set; } = "idle";
|
|
|
|
[JsonPropertyName("started_at")]
|
|
public string? StartedAt { get; set; }
|
|
|
|
[JsonPropertyName("finished_at")]
|
|
public string? FinishedAt { get; set; }
|
|
|
|
[JsonPropertyName("error")]
|
|
public string? Error { get; set; }
|
|
|
|
[JsonPropertyName("title")]
|
|
public string? Title { get; set; }
|
|
|
|
[JsonPropertyName("timestamp_ms")]
|
|
public long? TimestampMs { get; set; }
|
|
|
|
[JsonPropertyName("model")]
|
|
public string? Model { get; set; }
|
|
|
|
[JsonPropertyName("route")]
|
|
public string? Route { get; set; }
|
|
|
|
[JsonPropertyName("preparing")]
|
|
public string? Preparing { get; set; }
|
|
|
|
[JsonPropertyName("indexed_frames")]
|
|
public int? IndexedFrames { get; set; }
|
|
|
|
[JsonPropertyName("already_captioned")]
|
|
public int? AlreadyCaptioned { get; set; }
|
|
|
|
[JsonPropertyName("frames_selected")]
|
|
public int? FramesSelected { get; set; }
|
|
|
|
[JsonPropertyName("frames_total")]
|
|
public int? FramesTotal { get; set; }
|
|
|
|
[JsonPropertyName("frames_completed")]
|
|
public int? FramesCompleted { get; set; }
|
|
|
|
[JsonPropertyName("failed")]
|
|
public int? Failed { get; set; }
|
|
|
|
[JsonPropertyName("retained")]
|
|
public int? Retained { get; set; }
|
|
|
|
[JsonPropertyName("general_total")]
|
|
public int? GeneralTotal { get; set; }
|
|
|
|
[JsonPropertyName("specialist_total")]
|
|
public int? SpecialistTotal { get; set; }
|
|
|
|
[JsonPropertyName("documents_processed")]
|
|
public int? DocumentsProcessed { get; set; }
|
|
|
|
[JsonPropertyName("percent")]
|
|
public double? Percent { get; set; }
|
|
|
|
[JsonPropertyName("paused")]
|
|
public bool Paused { get; set; }
|
|
|
|
[JsonPropertyName("pause_requested")]
|
|
public bool PauseRequested { get; set; }
|
|
|
|
[JsonPropertyName("stop_requested")]
|
|
public bool StopRequested { get; set; }
|
|
}
|