| | 1 | | #nullable disable |
| | 2 | |
|
| | 3 | | #pragma warning disable CS1591 |
| | 4 | |
|
| | 5 | | using System; |
| | 6 | | using System.Collections.Generic; |
| | 7 | | using System.Text.Json.Serialization; |
| | 8 | | using Jellyfin.Extensions; |
| | 9 | | using MediaBrowser.Model.LiveTv; |
| | 10 | |
|
| | 11 | | namespace MediaBrowser.Controller.LiveTv |
| | 12 | | { |
| | 13 | | public class TimerInfo |
| | 14 | | { |
| | 15 | | public TimerInfo() |
| | 16 | | { |
| 18 | 17 | | Genres = Array.Empty<string>(); |
| 18 | 18 | | KeepUntil = KeepUntil.UntilDeleted; |
| 18 | 19 | | ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); |
| 18 | 20 | | SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase); |
| 18 | 21 | | Tags = Array.Empty<string>(); |
| 18 | 22 | | } |
| | 23 | |
|
| | 24 | | public Dictionary<string, string> ProviderIds { get; set; } |
| | 25 | |
|
| | 26 | | public Dictionary<string, string> SeriesProviderIds { get; set; } |
| | 27 | |
|
| | 28 | | public string[] Tags { get; set; } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Gets or sets the id of the recording. |
| | 32 | | /// </summary> |
| | 33 | | public string Id { get; set; } |
| | 34 | |
|
| | 35 | | /// <summary> |
| | 36 | | /// Gets or sets the series timer identifier. |
| | 37 | | /// </summary> |
| | 38 | | public string SeriesTimerId { get; set; } |
| | 39 | |
|
| | 40 | | /// <summary> |
| | 41 | | /// Gets or sets the channelId of the recording. |
| | 42 | | /// </summary> |
| | 43 | | public string ChannelId { get; set; } |
| | 44 | |
|
| | 45 | | /// <summary> |
| | 46 | | /// Gets or sets the program identifier. |
| | 47 | | /// </summary> |
| | 48 | | /// <value>The program identifier.</value> |
| | 49 | | public string ProgramId { get; set; } |
| | 50 | |
|
| | 51 | | public string ShowId { get; set; } |
| | 52 | |
|
| | 53 | | /// <summary> |
| | 54 | | /// Gets or sets the name of the recording. |
| | 55 | | /// </summary> |
| | 56 | | public string Name { get; set; } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// Gets or sets the description of the recording. |
| | 60 | | /// </summary> |
| | 61 | | public string Overview { get; set; } |
| | 62 | |
|
| | 63 | | public string SeriesId { get; set; } |
| | 64 | |
|
| | 65 | | /// <summary> |
| | 66 | | /// Gets or sets the start date of the recording, in UTC. |
| | 67 | | /// </summary> |
| | 68 | | public DateTime StartDate { get; set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets or sets the end date of the recording, in UTC. |
| | 72 | | /// </summary> |
| | 73 | | public DateTime EndDate { get; set; } |
| | 74 | |
|
| | 75 | | /// <summary> |
| | 76 | | /// Gets or sets the status. |
| | 77 | | /// </summary> |
| | 78 | | /// <value>The status.</value> |
| | 79 | | public RecordingStatus Status { get; set; } |
| | 80 | |
|
| | 81 | | /// <summary> |
| | 82 | | /// Gets or sets the pre padding seconds. |
| | 83 | | /// </summary> |
| | 84 | | /// <value>The pre padding seconds.</value> |
| | 85 | | public int PrePaddingSeconds { get; set; } |
| | 86 | |
|
| | 87 | | /// <summary> |
| | 88 | | /// Gets or sets the post padding seconds. |
| | 89 | | /// </summary> |
| | 90 | | /// <value>The post padding seconds.</value> |
| | 91 | | public int PostPaddingSeconds { get; set; } |
| | 92 | |
|
| | 93 | | /// <summary> |
| | 94 | | /// Gets or sets a value indicating whether this instance is pre padding required. |
| | 95 | | /// </summary> |
| | 96 | | /// <value><c>true</c> if this instance is pre padding required; otherwise, <c>false</c>.</value> |
| | 97 | | public bool IsPrePaddingRequired { get; set; } |
| | 98 | |
|
| | 99 | | /// <summary> |
| | 100 | | /// Gets or sets a value indicating whether this instance is post padding required. |
| | 101 | | /// </summary> |
| | 102 | | /// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value> |
| | 103 | | public bool IsPostPaddingRequired { get; set; } |
| | 104 | |
|
| | 105 | | public bool IsManual { get; set; } |
| | 106 | |
|
| | 107 | | /// <summary> |
| | 108 | | /// Gets or sets the priority. |
| | 109 | | /// </summary> |
| | 110 | | /// <value>The priority.</value> |
| | 111 | | public int Priority { get; set; } |
| | 112 | |
|
| | 113 | | public int RetryCount { get; set; } |
| | 114 | |
|
| | 115 | | // Program properties |
| | 116 | | public int? SeasonNumber { get; set; } |
| | 117 | |
|
| | 118 | | /// <summary> |
| | 119 | | /// Gets or sets the episode number. |
| | 120 | | /// </summary> |
| | 121 | | /// <value>The episode number.</value> |
| | 122 | | public int? EpisodeNumber { get; set; } |
| | 123 | |
|
| | 124 | | public bool IsMovie { get; set; } |
| | 125 | |
|
| 9 | 126 | | public bool IsKids => Tags.Contains("Kids", StringComparison.OrdinalIgnoreCase); |
| | 127 | |
|
| 9 | 128 | | public bool IsSports => Tags.Contains("Sports", StringComparison.OrdinalIgnoreCase); |
| | 129 | |
|
| 9 | 130 | | public bool IsNews => Tags.Contains("News", StringComparison.OrdinalIgnoreCase); |
| | 131 | |
|
| | 132 | | public bool IsSeries { get; set; } |
| | 133 | |
|
| | 134 | | /// <summary> |
| | 135 | | /// Gets a value indicating whether this instance is live. |
| | 136 | | /// </summary> |
| | 137 | | /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value> |
| | 138 | | [JsonIgnore] |
| 9 | 139 | | public bool IsLive => Tags.Contains("Live", StringComparison.OrdinalIgnoreCase); |
| | 140 | |
|
| | 141 | | [JsonIgnore] |
| 9 | 142 | | public bool IsPremiere => Tags.Contains("Premiere", StringComparison.OrdinalIgnoreCase); |
| | 143 | |
|
| | 144 | | public int? ProductionYear { get; set; } |
| | 145 | |
|
| | 146 | | public string EpisodeTitle { get; set; } |
| | 147 | |
|
| | 148 | | public DateTime? OriginalAirDate { get; set; } |
| | 149 | |
|
| | 150 | | public bool IsProgramSeries { get; set; } |
| | 151 | |
|
| | 152 | | public bool IsRepeat { get; set; } |
| | 153 | |
|
| | 154 | | public string HomePageUrl { get; set; } |
| | 155 | |
|
| | 156 | | public float? CommunityRating { get; set; } |
| | 157 | |
|
| | 158 | | public string OfficialRating { get; set; } |
| | 159 | |
|
| | 160 | | public string[] Genres { get; set; } |
| | 161 | |
|
| | 162 | | public string RecordingPath { get; set; } |
| | 163 | |
|
| | 164 | | public KeepUntil KeepUntil { get; set; } |
| | 165 | | } |
| | 166 | | } |