GetProgramsDto.cs 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Diagnostics.CodeAnalysis;
  4. using System.Text.Json.Serialization;
  5. using Jellyfin.Data.Enums;
  6. using MediaBrowser.Common.Json.Converters;
  7. using MediaBrowser.Model.Entities;
  8. using MediaBrowser.Model.Querying;
  9. namespace Jellyfin.Api.Models.LiveTvDtos
  10. {
  11. /// <summary>
  12. /// Get programs dto.
  13. /// </summary>
  14. public class GetProgramsDto
  15. {
  16. /// <summary>
  17. /// Gets or sets the channels to return guide information for.
  18. /// </summary>
  19. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  20. public IReadOnlyList<Guid> ChannelIds { get; set; } = Array.Empty<Guid>();
  21. /// <summary>
  22. /// Gets or sets optional. Filter by user id.
  23. /// </summary>
  24. public Guid UserId { get; set; }
  25. /// <summary>
  26. /// Gets or sets the minimum premiere start date.
  27. /// Optional.
  28. /// </summary>
  29. public DateTime? MinStartDate { get; set; }
  30. /// <summary>
  31. /// Gets or sets filter by programs that have completed airing, or not.
  32. /// Optional.
  33. /// </summary>
  34. public bool? HasAired { get; set; }
  35. /// <summary>
  36. /// Gets or sets filter by programs that are currently airing, or not.
  37. /// Optional.
  38. /// </summary>
  39. public bool? IsAiring { get; set; }
  40. /// <summary>
  41. /// Gets or sets the maximum premiere start date.
  42. /// Optional.
  43. /// </summary>
  44. public DateTime? MaxStartDate { get; set; }
  45. /// <summary>
  46. /// Gets or sets the minimum premiere end date.
  47. /// Optional.
  48. /// </summary>
  49. public DateTime? MinEndDate { get; set; }
  50. /// <summary>
  51. /// Gets or sets the maximum premiere end date.
  52. /// Optional.
  53. /// </summary>
  54. public DateTime? MaxEndDate { get; set; }
  55. /// <summary>
  56. /// Gets or sets filter for movies.
  57. /// Optional.
  58. /// </summary>
  59. public bool? IsMovie { get; set; }
  60. /// <summary>
  61. /// Gets or sets filter for series.
  62. /// Optional.
  63. /// </summary>
  64. public bool? IsSeries { get; set; }
  65. /// <summary>
  66. /// Gets or sets filter for news.
  67. /// Optional.
  68. /// </summary>
  69. public bool? IsNews { get; set; }
  70. /// <summary>
  71. /// Gets or sets filter for kids.
  72. /// Optional.
  73. /// </summary>
  74. public bool? IsKids { get; set; }
  75. /// <summary>
  76. /// Gets or sets filter for sports.
  77. /// Optional.
  78. /// </summary>
  79. public bool? IsSports { get; set; }
  80. /// <summary>
  81. /// Gets or sets the record index to start at. All items with a lower index will be dropped from the results.
  82. /// Optional.
  83. /// </summary>
  84. public int? StartIndex { get; set; }
  85. /// <summary>
  86. /// Gets or sets the maximum number of records to return.
  87. /// Optional.
  88. /// </summary>
  89. public int? Limit { get; set; }
  90. /// <summary>
  91. /// Gets or sets specify one or more sort orders, comma delimited. Options: Name, StartDate.
  92. /// Optional.
  93. /// </summary>
  94. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  95. public IReadOnlyList<string> SortBy { get; set; } = Array.Empty<string>();
  96. /// <summary>
  97. /// Gets or sets sort Order - Ascending,Descending.
  98. /// </summary>
  99. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  100. public IReadOnlyList<SortOrder> SortOrder { get; set; } = Array.Empty<SortOrder>();
  101. /// <summary>
  102. /// Gets or sets the genres to return guide information for.
  103. /// </summary>
  104. [JsonConverter(typeof(JsonPipeDelimitedArrayConverterFactory))]
  105. public IReadOnlyList<string> Genres { get; set; } = Array.Empty<string>();
  106. /// <summary>
  107. /// Gets or sets the genre ids to return guide information for.
  108. /// </summary>
  109. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  110. public IReadOnlyList<Guid> GenreIds { get; set; } = Array.Empty<Guid>();
  111. /// <summary>
  112. /// Gets or sets include image information in output.
  113. /// Optional.
  114. /// </summary>
  115. public bool? EnableImages { get; set; }
  116. /// <summary>
  117. /// Gets or sets a value indicating whether retrieve total record count.
  118. /// </summary>
  119. public bool EnableTotalRecordCount { get; set; } = true;
  120. /// <summary>
  121. /// Gets or sets the max number of images to return, per image type.
  122. /// Optional.
  123. /// </summary>
  124. public int? ImageTypeLimit { get; set; }
  125. /// <summary>
  126. /// Gets or sets the image types to include in the output.
  127. /// Optional.
  128. /// </summary>
  129. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  130. public IReadOnlyList<ImageType> EnableImageTypes { get; set; } = Array.Empty<ImageType>();
  131. /// <summary>
  132. /// Gets or sets include user data.
  133. /// Optional.
  134. /// </summary>
  135. public bool? EnableUserData { get; set; }
  136. /// <summary>
  137. /// Gets or sets filter by series timer id.
  138. /// Optional.
  139. /// </summary>
  140. public string? SeriesTimerId { get; set; }
  141. /// <summary>
  142. /// Gets or sets filter by library series id.
  143. /// Optional.
  144. /// </summary>
  145. public Guid LibrarySeriesId { get; set; }
  146. /// <summary>
  147. /// Gets or sets specify additional fields of information to return in the output. This allows multiple, comma delimited. Options: Budget, Chapters, DateCreated, Genres, HomePageUrl, IndexOptions, MediaStreams, Overview, ParentId, Path, People, ProviderIds, PrimaryImageAspectRatio, Revenue, SortName, Studios, Taglines.
  148. /// Optional.
  149. /// </summary>
  150. [JsonConverter(typeof(JsonCommaDelimitedArrayConverterFactory))]
  151. public IReadOnlyList<ItemFields> Fields { get; set; } = Array.Empty<ItemFields>();
  152. }
  153. }