using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.Serialization; namespace MediaBrowser.Controller.LiveTv { public class TimerInfo { public TimerInfo() { Genres = Array.Empty(); KeepUntil = KeepUntil.UntilDeleted; ProviderIds = new Dictionary(StringComparer.OrdinalIgnoreCase); SeriesProviderIds = new Dictionary(StringComparer.OrdinalIgnoreCase); Tags = Array.Empty(); } public Dictionary ProviderIds { get; set; } public Dictionary SeriesProviderIds { get; set; } public string[] Tags { get; set; } /// /// Id of the recording. /// public string Id { get; set; } /// /// Gets or sets the series timer identifier. /// /// The series timer identifier. public string SeriesTimerId { get; set; } /// /// ChannelId of the recording. /// public string ChannelId { get; set; } /// /// Gets or sets the program identifier. /// /// The program identifier. public string ProgramId { get; set; } public string ShowId { get; set; } /// /// Name of the recording. /// public string Name { get; set; } /// /// Description of the recording. /// public string Overview { get; set; } public string SeriesId { get; set; } /// /// The start date of the recording, in UTC. /// public DateTime StartDate { get; set; } /// /// The end date of the recording, in UTC. /// public DateTime EndDate { get; set; } /// /// Gets or sets the status. /// /// The status. public RecordingStatus Status { get; set; } /// /// Gets or sets the pre padding seconds. /// /// The pre padding seconds. public int PrePaddingSeconds { get; set; } /// /// Gets or sets the post padding seconds. /// /// The post padding seconds. public int PostPaddingSeconds { get; set; } /// /// Gets or sets a value indicating whether this instance is pre padding required. /// /// true if this instance is pre padding required; otherwise, false. public bool IsPrePaddingRequired { get; set; } /// /// Gets or sets a value indicating whether this instance is post padding required. /// /// true if this instance is post padding required; otherwise, false. public bool IsPostPaddingRequired { get; set; } public bool IsManual { get; set; } /// /// Gets or sets the priority. /// /// The priority. public int Priority { get; set; } public int RetryCount { get; set; } // Program properties public int? SeasonNumber { get; set; } /// /// Gets or sets the episode number. /// /// The episode number. public int? EpisodeNumber { get; set; } 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); public bool IsSeries { get; set; } /// /// Gets or sets a value indicating whether this instance is live. /// /// true if this instance is live; otherwise, false. [IgnoreDataMember] public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase); [IgnoreDataMember] public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase); public int? ProductionYear { get; set; } public string EpisodeTitle { get; set; } public DateTime? OriginalAirDate { get; set; } public bool IsProgramSeries { get; set; } public bool IsRepeat { get; set; } public string HomePageUrl { get; set; } public float? CommunityRating { get; set; } public string OfficialRating { get; set; } public string[] Genres { get; set; } public string RecordingPath { get; set; } public KeepUntil KeepUntil { get; set; } } }