117 lines
3.3 KiB
C#
117 lines
3.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics.CodeAnalysis;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Jellyfin.Plugin.SRFPlay.Api.Models;
|
|
|
|
/// <summary>
|
|
/// Represents a video/episode from the Play v3 API.
|
|
/// </summary>
|
|
public class PlayV3Video
|
|
{
|
|
/// <summary>
|
|
/// Gets or sets the video ID.
|
|
/// </summary>
|
|
[JsonPropertyName("id")]
|
|
public string? Id { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the video URN.
|
|
/// </summary>
|
|
[JsonPropertyName("urn")]
|
|
public string? Urn { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the video title.
|
|
/// </summary>
|
|
[JsonPropertyName("title")]
|
|
public string? Title { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the episode ID.
|
|
/// </summary>
|
|
[JsonPropertyName("episodeId")]
|
|
public string? EpisodeId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the lead description.
|
|
/// </summary>
|
|
[JsonPropertyName("lead")]
|
|
public string? Lead { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the full description.
|
|
/// </summary>
|
|
[JsonPropertyName("description")]
|
|
public string? Description { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the image URL.
|
|
/// </summary>
|
|
[JsonPropertyName("imageUrl")]
|
|
public string? ImageUrl { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the duration in milliseconds.
|
|
/// </summary>
|
|
[JsonPropertyName("duration")]
|
|
public long Duration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the publication date.
|
|
/// </summary>
|
|
[JsonPropertyName("date")]
|
|
public DateTime Date { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the valid from date.
|
|
/// </summary>
|
|
[JsonPropertyName("validFrom")]
|
|
public DateTime? ValidFrom { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the valid to date (expiration).
|
|
/// </summary>
|
|
[JsonPropertyName("validTo")]
|
|
public DateTime? ValidTo { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the media type (VIDEO or AUDIO).
|
|
/// </summary>
|
|
[JsonPropertyName("mediaType")]
|
|
public string? MediaType { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether subtitles are available.
|
|
/// </summary>
|
|
[JsonPropertyName("subtitlesAvailable")]
|
|
public bool SubtitlesAvailable { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets a value indicating whether the content is playable abroad.
|
|
/// </summary>
|
|
[JsonPropertyName("playableAbroad")]
|
|
public bool PlayableAbroad { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the list of possible block reasons.
|
|
/// </summary>
|
|
[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<string>? PossibleBlockReasons { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the content type (EPISODE, CLIP, etc.).
|
|
/// </summary>
|
|
[JsonPropertyName("type")]
|
|
public string? Type { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the associated show information.
|
|
/// </summary>
|
|
[JsonPropertyName("show")]
|
|
public PlayV3Show? Show { get; set; }
|
|
}
|