GetProgramsDto.cs 6.0 KB

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