GetProgramsDto.cs 5.4 KB

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