using System.Collections.ObjectModel;
using System.Text.Json.Serialization;
namespace Jellyfin.Plugin.JRay.Models;
///
/// Root object of a scene-actor-extraction "truth" file
/// (schema_version 2). See SPEC.md ยง1.
///
///
/// JRay owns this format; the extraction pipeline is its producer and the
/// public server carries a derived envelope. Because three repos ship
/// independently, breaking changes are batched into one coordinated
/// schema_version bump rather than made piecemeal.
///
///
/// This is the v2 shape, and v1 is gone rather than deprecated. The bump
/// removed anneal_sec, moved sample_fps into
/// , added , and turned
/// scenes from float pairs into objects carrying
/// belief and route. Nothing here reads a v1 file: see
/// for why that is a decision rather than an
/// omission.
///
///
// TRACES: JR-001, JR-002 | SR-003
public class TruthFile
{
///
/// Gets or sets the schema version of this file. Only
/// is accepted.
///
[JsonPropertyName("schema_version")]
public int SchemaVersion { get; set; }
///
/// Gets or sets the source media path at extraction time (informational).
///
///
/// Stripped on contribution (JR-034): it is a contributor's directory
/// layout, which is nobody else's business and identifies them.
///
[JsonPropertyName("movie")]
public string Movie { get; set; } = string.Empty;
///
/// Gets or sets extraction provenance, or null when the producer
/// recorded none.
///
[JsonPropertyName("extraction")]
public TruthExtraction? Extraction { get; set; }
///
/// Gets or sets which encode the timings apply to, or null when the
/// producer recorded none.
///
[JsonPropertyName("cut")]
public TruthCut? Cut { get; set; }
///
/// Gets the list of actors in the film, each with their scene-presence windows.
///
[JsonPropertyName("actors")]
[JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
public Collection Actors { get; } = new();
}