TimerInfo.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using MediaBrowser.Model.LiveTv;
  5. using MediaBrowser.Model.Serialization;
  6. namespace MediaBrowser.Controller.LiveTv
  7. {
  8. public class TimerInfo
  9. {
  10. public TimerInfo()
  11. {
  12. Genres = Array.Empty<string>();
  13. KeepUntil = KeepUntil.UntilDeleted;
  14. ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  15. SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
  16. Tags = Array.Empty<string>();
  17. }
  18. public Dictionary<string, string> ProviderIds { get; set; }
  19. public Dictionary<string, string> SeriesProviderIds { get; set; }
  20. public string[] Tags { get; set; }
  21. /// <summary>
  22. /// Id of the recording.
  23. /// </summary>
  24. public string Id { get; set; }
  25. /// <summary>
  26. /// Gets or sets the series timer identifier.
  27. /// </summary>
  28. /// <value>The series timer identifier.</value>
  29. public string SeriesTimerId { get; set; }
  30. /// <summary>
  31. /// ChannelId of the recording.
  32. /// </summary>
  33. public string ChannelId { get; set; }
  34. /// <summary>
  35. /// Gets or sets the program identifier.
  36. /// </summary>
  37. /// <value>The program identifier.</value>
  38. public string ProgramId { get; set; }
  39. public string ShowId { get; set; }
  40. /// <summary>
  41. /// Name of the recording.
  42. /// </summary>
  43. public string Name { get; set; }
  44. /// <summary>
  45. /// Description of the recording.
  46. /// </summary>
  47. public string Overview { get; set; }
  48. public string SeriesId { get; set; }
  49. /// <summary>
  50. /// The start date of the recording, in UTC.
  51. /// </summary>
  52. public DateTime StartDate { get; set; }
  53. /// <summary>
  54. /// The end date of the recording, in UTC.
  55. /// </summary>
  56. public DateTime EndDate { get; set; }
  57. /// <summary>
  58. /// Gets or sets the status.
  59. /// </summary>
  60. /// <value>The status.</value>
  61. public RecordingStatus Status { get; set; }
  62. /// <summary>
  63. /// Gets or sets the pre padding seconds.
  64. /// </summary>
  65. /// <value>The pre padding seconds.</value>
  66. public int PrePaddingSeconds { get; set; }
  67. /// <summary>
  68. /// Gets or sets the post padding seconds.
  69. /// </summary>
  70. /// <value>The post padding seconds.</value>
  71. public int PostPaddingSeconds { get; set; }
  72. /// <summary>
  73. /// Gets or sets a value indicating whether this instance is pre padding required.
  74. /// </summary>
  75. /// <value><c>true</c> if this instance is pre padding required; otherwise, <c>false</c>.</value>
  76. public bool IsPrePaddingRequired { get; set; }
  77. /// <summary>
  78. /// Gets or sets a value indicating whether this instance is post padding required.
  79. /// </summary>
  80. /// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
  81. public bool IsPostPaddingRequired { get; set; }
  82. public bool IsManual { get; set; }
  83. /// <summary>
  84. /// Gets or sets the priority.
  85. /// </summary>
  86. /// <value>The priority.</value>
  87. public int Priority { get; set; }
  88. public int RetryCount { get; set; }
  89. // Program properties
  90. public int? SeasonNumber { get; set; }
  91. /// <summary>
  92. /// Gets or sets the episode number.
  93. /// </summary>
  94. /// <value>The episode number.</value>
  95. public int? EpisodeNumber { get; set; }
  96. public bool IsMovie { get; set; }
  97. public bool IsKids => Tags.Contains("Kids", StringComparer.OrdinalIgnoreCase);
  98. public bool IsSports => Tags.Contains("Sports", StringComparer.OrdinalIgnoreCase);
  99. public bool IsNews => Tags.Contains("News", StringComparer.OrdinalIgnoreCase);
  100. public bool IsSeries { get; set; }
  101. /// <summary>
  102. /// Gets or sets a value indicating whether this instance is live.
  103. /// </summary>
  104. /// <value><c>true</c> if this instance is live; otherwise, <c>false</c>.</value>
  105. [IgnoreDataMember]
  106. public bool IsLive => Tags.Contains("Live", StringComparer.OrdinalIgnoreCase);
  107. [IgnoreDataMember]
  108. public bool IsPremiere => Tags.Contains("Premiere", StringComparer.OrdinalIgnoreCase);
  109. public int? ProductionYear { get; set; }
  110. public string EpisodeTitle { get; set; }
  111. public DateTime? OriginalAirDate { get; set; }
  112. public bool IsProgramSeries { get; set; }
  113. public bool IsRepeat { get; set; }
  114. public string HomePageUrl { get; set; }
  115. public float? CommunityRating { get; set; }
  116. public string OfficialRating { get; set; }
  117. public string[] Genres { get; set; }
  118. public string RecordingPath { get; set; }
  119. public KeepUntil KeepUntil { get; set; }
  120. }
  121. }