using System; using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Text.Json.Serialization; namespace Jellyfin.Plugin.SRFPlay.Api.Models; /// /// Represents a video/episode from the Play v3 API. /// public class PlayV3Video { /// /// Gets or sets the video ID. /// [JsonPropertyName("id")] public string? Id { get; set; } /// /// Gets or sets the video URN. /// [JsonPropertyName("urn")] public string? Urn { get; set; } /// /// Gets or sets the video title. /// [JsonPropertyName("title")] public string? Title { get; set; } /// /// Gets or sets the episode ID. /// [JsonPropertyName("episodeId")] public string? EpisodeId { get; set; } /// /// Gets or sets the lead description. /// [JsonPropertyName("lead")] public string? Lead { get; set; } /// /// Gets or sets the full description. /// [JsonPropertyName("description")] public string? Description { get; set; } /// /// Gets or sets the image URL. /// [JsonPropertyName("imageUrl")] public string? ImageUrl { get; set; } /// /// Gets or sets the duration in milliseconds. /// [JsonPropertyName("duration")] public long Duration { get; set; } /// /// Gets or sets the publication date. /// [JsonPropertyName("date")] public DateTime Date { get; set; } /// /// Gets or sets the valid from date. /// [JsonPropertyName("validFrom")] public DateTime? ValidFrom { get; set; } /// /// Gets or sets the valid to date (expiration). /// [JsonPropertyName("validTo")] public DateTime? ValidTo { get; set; } /// /// Gets or sets the media type (VIDEO or AUDIO). /// [JsonPropertyName("mediaType")] public string? MediaType { get; set; } /// /// Gets or sets a value indicating whether subtitles are available. /// [JsonPropertyName("subtitlesAvailable")] public bool SubtitlesAvailable { get; set; } /// /// Gets or sets a value indicating whether the content is playable abroad. /// [JsonPropertyName("playableAbroad")] public bool PlayableAbroad { get; set; } /// /// Gets or sets the list of possible block reasons. /// [JsonPropertyName("possibleBlockReasons")] [SuppressMessage("Usage", "CA2227:Collection properties should be read only", Justification = "Required for JSON deserialization")] [SuppressMessage("Design", "CA1002:Do not expose generic lists", Justification = "DTO for JSON deserialization")] public List? PossibleBlockReasons { get; set; } /// /// Gets or sets the content type (EPISODE, CLIP, etc.). /// [JsonPropertyName("type")] public string? Type { get; set; } /// /// Gets or sets the associated show information. /// [JsonPropertyName("show")] public PlayV3Show? Show { get; set; } }