aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv/TimerInfo.cs
blob: 1a2e8acb31cbc37b56c0b9ad67744ea99a1ced80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
#nullable disable

#pragma warning disable CS1591

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.Json.Serialization;
using MediaBrowser.Model.LiveTv;

namespace MediaBrowser.Controller.LiveTv
{
    public class TimerInfo
    {
        public TimerInfo()
        {
            Genres = Array.Empty<string>();
            KeepUntil = KeepUntil.UntilDeleted;
            ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
            SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
            Tags = Array.Empty<string>();
        }

        public Dictionary<string, string> ProviderIds { get; set; }

        public Dictionary<string, string> SeriesProviderIds { get; set; }

        public string[] Tags { get; set; }

        /// <summary>
        /// Gets or sets the id of the recording.
        /// </summary>
        public string Id { get; set; }

        /// <summary>
        /// Gets or sets the series timer identifier.
        /// </summary>
        public string SeriesTimerId { get; set; }

        /// <summary>
        /// Gets or sets the 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>
        /// Gets or sets the name of the recording.
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets the description of the recording.
        /// </summary>
        public string Overview { get; set; }

        public string SeriesId { get; set; }

        /// <summary>
        /// Gets or sets the start date of the recording, in UTC.
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// Gets or sets 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; }

        /// <summary>
        /// Gets or sets the episode number.
        /// </summary>
        /// <value>The episode number.</value>
        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; }

        /// <summary>
        /// Gets a value indicating whether this instance is live.
        /// </summary>
        /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
        [JsonIgnore]
        public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);

        [JsonIgnore]
        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; }
    }
}