jellyfin/MediaBrowser.Controller/LiveTv/TimerInfo.cs

166 lines
5.0 KiB
C#
Raw Normal View History

#pragma warning disable CS1591
using System;
2018-12-27 16:27:57 -07:00
using System.Collections.Generic;
using System.Linq;
2019-10-15 08:49:49 -07:00
using System.Text.Json.Serialization;
using MediaBrowser.Model.LiveTv;
2018-12-27 16:27:57 -07:00
namespace MediaBrowser.Controller.LiveTv
{
public class TimerInfo
{
public TimerInfo()
{
2018-12-27 14:43:48 -07:00
Genres = Array.Empty<string>();
2018-12-27 16:27:57 -07:00
KeepUntil = KeepUntil.UntilDeleted;
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
2018-12-27 14:43:48 -07:00
Tags = Array.Empty<string>();
2018-12-27 16:27:57 -07:00
}
public Dictionary<string, string> ProviderIds { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public Dictionary<string, string> SeriesProviderIds { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public string[] Tags { get; set; }
/// <summary>
/// Id of the recording.
/// </summary>
public string Id { get; set; }
/// <summary>
/// Gets or sets the series timer identifier.
/// </summary>
/// <value>The series timer identifier.</value>
public string SeriesTimerId { get; set; }
/// <summary>
/// ChannelId of the recording.
/// </summary>
public string ChannelId { get; set; }
/// <summary>
/// Gets or sets the program identifier.
/// </summary>
/// <value>The program identifier.</value>
public string ProgramId { get; set; }
public string ShowId { get; set; }
/// <summary>
/// Name of the recording.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Description of the recording.
/// </summary>
public string Overview { get; set; }
public string SeriesId { get; set; }
/// <summary>
/// The start date of the recording, in UTC.
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// The end date of the recording, in UTC.
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// Gets or sets the status.
/// </summary>
/// <value>The status.</value>
public RecordingStatus Status { get; set; }
/// <summary>
/// Gets or sets the pre padding seconds.
/// </summary>
/// <value>The pre padding seconds.</value>
public int PrePaddingSeconds { get; set; }
/// <summary>
/// Gets or sets the post padding seconds.
/// </summary>
/// <value>The post padding seconds.</value>
public int PostPaddingSeconds { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is pre padding required.
/// </summary>
/// <value><c>true</c> if this instance is pre padding required; otherwise, <c>false</c>.</value>
public bool IsPrePaddingRequired { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is post padding required.
/// </summary>
/// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
public bool IsPostPaddingRequired { get; set; }
public bool IsManual { get; set; }
/// <summary>
/// Gets or sets the priority.
/// </summary>
/// <value>The priority.</value>
public int Priority { get; set; }
public int RetryCount { get; set; }
// Program properties
public int? SeasonNumber { get; set; }
2020-09-28 13:04:31 -07:00
2018-12-27 16:27:57 -07:00
/// <summary>
/// Gets or sets the episode number.
/// </summary>
/// <value>The episode number.</value>
public int? EpisodeNumber { get; set; }
2018-12-27 16:27:57 -07:00
public bool IsMovie { get; set; }
public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
2018-12-27 16:27:57 -07:00
public bool IsSeries { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this instance is live.
/// </summary>
/// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
2019-10-15 08:49:49 -07:00
[JsonIgnore]
public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
2018-12-27 16:27:57 -07:00
2019-10-15 08:49:49 -07:00
[JsonIgnore]
public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
2018-12-27 16:27:57 -07:00
public int? ProductionYear { get; set; }
2018-12-27 16:27:57 -07:00
public string EpisodeTitle { get; set; }
2018-12-27 16:27:57 -07:00
public DateTime? OriginalAirDate { get; set; }
2018-12-27 16:27:57 -07:00
public bool IsProgramSeries { get; set; }
2018-12-27 16:27:57 -07:00
public bool IsRepeat { get; set; }
2018-12-27 16:27:57 -07:00
public string HomePageUrl { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public float? CommunityRating { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public string OfficialRating { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public string[] Genres { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public string RecordingPath { get; set; }
2020-06-15 14:43:52 -07:00
2018-12-27 16:27:57 -07:00
public KeepUntil KeepUntil { get; set; }
}
}